Redirect to the index page if a user is already logged in and add logout page.