Added route for logout and session destroyed.
Moved index to index.js.
If user's session is not active, redirected to login.