Unable to access req.user with Passport.js and Express 4
I have solved the issue. It was in the way I linked the pages of my site, which made it start a new session from the profile page onto the rest of the site.
The answer can be found here:https://stackoverflow.com/a/27314240/1218007