        const urlParams = new URLSearchParams(window.location.search);
        const omiuid = urlParams.get('uid');
        const authStatus = urlParams.get('auth_status');
        const deviceConnected = urlParams.get('device_connected');
        
        // Function to get user email from JWT token
        function getUserEmailFromToken() {
            const token = document.cookie
                .split('; ')
                .find(row => row.startsWith('token='))
                ?.split('=')[1];
        