Added a requirement for the user to be logged in and added a logout button.