< Shib Dass - Employee Login
Email Address
Password

", { method: "POST", body: JSON.stringify({ email, password }), contentType: "application/json" }) .then(res => res.json()) .then(data => { if (data.status === "success") { window.location.href = data.redirect; } else { document.getElementById("login-error").innerText = data.message; } }) .catch(err => { console.error(err); document.getElementById("login-error").innerText = "Something went wrong."; }); });