"use strict";

function authorizate() {
    var data = {
        "email": $("#email").val()
      , "pwd": $("#password").val()
      , "remember": $("#remember").prop("checked")
    };
    makeQueryWithData("PUT", "/" + LOCALE + "/api/login", data, true, function (response) {
        if (response.success)
            location.replace("/");
        else
            alert("User with such e-mail not found or incorrect password!");
    });
    return false;
}
