var requireAuthentication = (req, res, next) => {
    if (middleware && middleware.requireAuthentication) {
      app.requireAuthentication(req, res, next);
    } else {
      next();