Handle login/logout properly.