Added the views function for logging out.
It is preceded by an app.route decorator for '/logout'.
It redirects the user to the index page.