url: "/api/register", // Replace with actual API URL for registration // Redirect to sign-in page on successful registration window.location.href = "/signin"; // Replace with actual sign-in URL // Display error messages // Assuming you have error message containers with class 'error-message' // Assuming you have error message containers with class 'error-message'