added ability to log in and log out