text: "use strict";
  "use strict";
  
  var handleError = function handleError(message) {
      $("#errorMessage").text(message);
      $("#loginMessage").fadeIn({ width: 'toggle' }, 100);
  };
  
  var redirect = function redirect(response) {
      $("#loginMessage").fadeIn({ width: 'hide' }, 100);
      window.location = response.redirect;
  };
  
  var sendAjax = function sendAjax(type, action, data, success) {
      $.ajax({
          cache: false,
          type: type,
          url: action,
          data: data,
          dataType: "json",
          success: success,
          error: function error(xhr, status, _error) {
              var messageObj = JSON.parse(xhr.responseText);
              handleError(messageObj.error);
          }
      });
  };
  