improved login/logout support for mobile browsers