I'm using a function attached to the login_url filter to create a custom login url. This url is currently not preserved when using remote login as redirect_login_to_orig() creates his own login url. The following change fixes this for me.
Index: domain_mapping.php
===================================================================
--- domain_mapping.php (revision 821067)
+++ domain_mapping.php (working copy)
@@ -658,6 +658,7 @@
$url = get_original_url( 'siteurl' );
if ( $url != site_url() ) {
$url .= "/wp-login.php";
+ $url = apply_filters( 'login_url', $url );
echo "<script type='text/javascript'>\nwindow.location = '$url'</script>";
}
}