Login/Logout fixes.