code: function logout(options) {
    return async function logoutHandler(ctx) {
      let referer = formatReferer(ctx, options.logoutPath, options.rootPath);
      const user = ctx.session[options.userField];
      if (!user) {
        return redirect(ctx, referer);
      }
  
      const redirectURL = await options.logoutCallback(ctx, user);
  
      ctx.session[options.userField] = null;
      if (redirectURL) {
        referer = redirectURL;
      }
      redirect(ctx, referer);
    };
  }
docs: return a logoutHandler
  @param {Object} options
  @return {Function}