code: function logout() {
      if (exports.currentLogin === null) {
          log_1.logger.debug(`[API] Already logged out`);
          return Promise.resolve();
      }
      log_1.logger.info(`[API] Logging out ${exports.currentLogin.username}`);
      return get('logout', null, true).then(() => {
          clearHeaders();
          exports.currentLogin = null;
      });
  }
docs: Logout a user at end of API calls