Added log in/log out functionality