Completed all login and logout functionality