Better handling of login/logout/reload (2)