document.addEventListener('DOMContentLoaded', function() {
// Monitor the registration form submission
const registrationForm = document.querySelector('.masterstudy_authorization_form');
if (registrationForm) {
registrationForm.addEventListener('submit', function(e) {
// Wait for the form to submit
setTimeout(function() {
// Check if the user is logged in (you may need to adjust this condition)
if (document.body.classList.contains('logged-in')) {
// Redirect to the desired URL
window.location.href = 'https://amshealthcorp.com';
}
}, 1000); // Adjust the delay as needed
});
}
});