Added log out functionality.