Finished user login/logout functionality