registerUserTokenCheck = (username, options={}) => {
  const password = options.password || 'default_password';
  const expiresIn = options.expiresIn || 60;
  const application = options.application || false;
  registerUser({username, password});
  const token = jwt.sign({username, application}, process.env.JWT_SECRET, {expiresIn});
  registerToken(username, [token]);
  return token;
}
@param {string} username
@param {Object} options
@param {string} options.password
@param {boolean} options.application - application token flag.
@param {(string|number)} options.expiresIn