        logoutBtn.innerHTML = 'Logging out...';
                    logoutBtn.classList.add('opacity-50', 'cursor-not-allowed');

                    // Submit the form
                    fetch(this.action, {
                        method: 'POST',
                        body: new FormData(this),
                        headers: {
                            'X-Requested-With': 'XMLHttpRequest'
                        }
                    })
                    .then(response => {
                       