async function Load() {
    await $.ajax({
        url: "/user/session",
        method: "PUT",
        success: function(answer) {
            if ("id" in answer && "username" in answer) {
                $("#SaveChangesBtn").on("click", async function() {
                    $("#ErrorText").html("");
                    if ($("#EntryTitle").val().length != 0 && $("#EntryDescription").val().length != 0) {
                        let data = {
                            user: answer.id,
                            title: $("#EntryTitle").val(),
                            description: $("#EntryDescription").val(),
                        };
                        await $.ajax({
                            url: "/entry/0",
                            method: "POST",
                            data: data,
                            success: function(response) {
                                alert("Entry has been created!");
                                Link("/");
                            },
                            error: function() {
                                $("#ErrorText").html("Data is missing!");
                            }
                        }); 
                    }
                    else {
                        $("#ErrorText").html("All fields must be filled!");
                    }
                });
            }
            else {
                Link("/");
            }
        }
    });
}