getItem('authToken');
            console.log('Auth token exists:', !!authToken);
            
            if (!authToken) {
                // Not authenticated, store pending join and redirect to index for login
                console.log('User not authenticated, redirecting to index.html for login');
                sessionStorage.setItem('pendingJoinConversation', conversationId);
                window.location.href = '/static/index.html';
                return;
            }
            
           