return false;
                }
                
                // Must not contain backslashes
                if (url.includes('\\')) {
                    return false;
                }
                
                return true;
            };

            // Get redirect URL with preserved query parameters
            const getRedirectUrl = () => {
                const urlParams = new URLSearchParams(window.location.search);
                const redirectParam = urlParams.get('redirect');
        