Login/Logout improvements