finished the login/logout mechanism close #2