login/logout smoother