Added logout functionality to the user view.