docs: function process_signin_request(request, h) {
      return new Promise((resolve, reject) => {
          dbMgr
              .findOne(app_config.get("app:db_collections:user_account"), {
                  "username": request.payload.username,
                  "password": auth_util.encrypt_password(request.payload.password)
              })
              .then((account) => {
                  /**
               * In this demo implementaion, the sessin cookie is set up without
               * encryption!!!
               *
               * A production implementaion must set the session state to
               * reflect signed in state.
               *
               */
  
                  if (account) {
                      var expire_on = moment().add(6, "months");
                      var session = {
                          username: request.payload.username,
                          expire_on: expire_on.format()
                      };
                      request
                          .cookieAuth
                          .set(session);
  
                      return resolve(account._id.toString());
                  } else {
                      return reject(new Error("Account not found."));
                  }
              }, (err) => {
                  reject(err);
              });
      });
  }