code: function(fn) {
      return function(req, res) {
  	if (req.session.loggedin) {
  	    return fn(req, res);
  	} else {
  	    res.redirect('/');
  	}
      };
  }
docs: Wrapper function for login-only pages. It redirects to / if the user is not logged in.