login/logout safety