Better login/logout flow.