if (window.location.href.indexOf("?error=1") > -1) {
    document.getElementById("messages").style.display = "flex";
    document.getElementById("messages_txt").style.display = "flex";
    document.getElementById("messages_txt").textContent = "Incorrect Login Info."
    setTimeout(() => {
        document.getElementById("messages").style.display = "none";
        document.getElementById("messages_txt").style.display = "none";
    }, 5000);
}

if (window.location.href.indexOf("?error=9") > -1) {
    document.getElementById("messages").style.display = "flex";
    document.getElementById("messages_txt").style.display = "flex";
    document.getElementById("messages_txt").textContent = "Session expired, please login again."
    setTimeout(() => {
        document.getElementById("messages").style.display = "none";
        document.getElementById("messages_txt").style.display = "none";
    }, 5000);
}