text: let auth = (() => {
      function saveSession(userInfo) {
          let userAuth = userInfo._kmd.authtoken;
          sessionStorage.setItem('authtoken', userAuth);
          let userId = userInfo._id;
          sessionStorage.setItem('userId', userId);
          let username = userInfo.username;
          sessionStorage.setItem('username', username);
          
      }
  
      // user/login
      function login(username, password) {
          let userData = {
              username,
              password
          };
  
          return requester.post('user', 'login', userData, 'basic');
      }
  
      // user/register
      function register(username, password, repeatPassword) {
          let userData = {
              username,
              password
          };
  
          return requester.post('user', '', userData, 'basic');
      }
  
      // user/logout
      function logout() {
          let logoutData = {
              authtoken: sessionStorage.getItem('authtoken')
          };
  
          return requester.post('user', '_logout', logoutData, 'kinvey');
      }
  
      function handleError(reason) {
          showError(reason.responseJSON.description);
      }
  
      function showInfo(message) {
          let infoBox = $('#infoBox');
          infoBox.text(message);
          infoBox.show();
          setTimeout(() => infoBox.fadeOut(), 3000);
      }
  
      function showError(message) {
          let errorBox = $('#errorBox');
          errorBox.text(message);
          errorBox.show();
          setTimeout(() => errorBox.fadeOut(), 3000);
      }
  
      function isAuth() {
          return sessionStorage.getItem('authtoken') !== null;
      }
  
      return {
          login,
          register,
          logout,
          saveSession,
          showInfo,
          showError,
          handleError,
          isAuth
      };
  })();