Added a logout function to the app index