added login/logout button functionality