@@ -0,0 +1,396 @@
+exports.isLoggedIn = function (req) %7B%0A  return req.session ? !!req.session.user : false;%0A%7D;%0A%0Aexports.createSession = function(req, res, newUser) %7B%0A  return req.session.regenerate(function () %7B%0A    req.session.user = newUser;%0A  %7D);%0A%7D;%0A%0Aexports.checkUser = function(req, res, next) %7B%0A  // Set property on body indicating whether user has a session%0A  res.body.loggedIn = exports.isLoggedIn(req);%0A%7D;%0A

Add session utility functions