fixes to login/logout flow when jumping domains