// Shared functionality // All client-side JavaScript remains the same except logout is now handled via PHP session