Moved the route require in server.js and added the missing require for express-session.