Added code to logout the user.