async function Load() {
    await $.ajax({
        url: "/user/session",
        method: "PUT",
        success: function(response) {
            if (response == 1) {
                Link("/");
            }
        }
    });
    $("#EnterBtn").on("click", async function() {
        if ($("#UserNameInputField").val().length != 0 && $("#EmailInputField").val().length != 0 && $("#PasswordInputField").val().length != 0) {
            if ($("#PasswordInputField").val() == $("#VerifyPasswordInputField").val()) {
                let data = {
                    username: $("#UserNameInputField").val(),
                    email: $("#EmailInputField").val(),
                    password: $("#PasswordInputField").val(),
                };
                await $.ajax({
                    url: "/user",
                    method: "POST",
                    data: data,
                    success: function() {
                        alert("Account created! Please, log in!");
                        Link("/log_in");
                    },
                    error: function() {
                        $("#ErrorText").html("User and/or Email is already in use!");
                    }
                });
            }
            else {
                $("#ErrorText").html("Passwords don't match!");
            }
        }
        else {
            $("#ErrorText").html("All input fields need to be filled!");
        }
    });
}