Cookie Syncing

I have a wildcard SSL certificate for my doman -
I have a multisite and multinetwork wordpress installation at
I have a mapped domain: points to
I have FORCE_SSL_LOGIN and FORCE_SSL_ADMIN set to true and I'm using a reverse proxy (Amazon AWS load balancer).
I've configured domain mapping to use the original address for login/admin.

I'm using the membership plugin to control access to certain pages, so users need to be able to login/logout.

I ran into a problem after login - clicking "Visit Site" pointed to, when it shouldn't be using SSL.
I corrected this by putting this code in mu-plugins:

function ssl_filter($url)
return preg_replace('/^https:\/\//', 'http://', $url);
add_filter('home_url', 'ssl_filter');

The only problem I'm left with is that logging out will log me out of but not - after logout I'll click "Back to Three Crosses Church". The url points to, which is redirected by the plugin to, where the user remains logged in.

Is there any way to logout of both domains at once?

Kind regards