code: function postAuthUser(req, res) {
      if (!req.body.username || !req.body.password || !req.body.displayName ||
        !
        req
        .body.email) {
        res.status(422).send('You must provide username, email, and password');
        return;
      }
  
      var user = new users(req.body);
      // user.displayName = req.body.displayName;
      // user.username = req.body.username;
      // user.email = req.body.email;
      // if(req.body.userdata_id) {
      //   // This is a hack, needs to be removed. #todo
      //   user.userdata_id = req.body.userdata_id;
      // }
  
      passwordAuth.saveUser(user, req.body.password)
        .then(function (user) {
          if (user) {
            log.info('New user saved to the database:', user.username);
            res.status(200).send(user);
          }
        }, function (err) {
          if (err && err.code === 11000) {
            // code 11000 is a mongoose code for duplicate key error
            log.error('Could not save user. Is username and email unique? ' +
              err
              .message);
            return res.status(422).send('Username already exists.');
          } else {
            throw err;
          }
        })
        .then(null, function (err) {
          log.error(err.message);
          return res.status(500).send('Internal error');
        });
    }
docs: POST /auth/user - Add (register) a new user depends on passwordAuth, users