added the log out functionality