e in success state
            if (authStatus === 'success' && deviceConnected === 'true') {
                // Hide main content and show success view
                mainContent.classList.add('hidden');
                successView.classList.remove('hidden');

                // Update device info
                const deviceId = document.getElementById('device-id');
                const userEmail = document.getElementById('user-email');
                const email = getUserEmailFromToken();

            