             
                // Load dashboard data which includes events
                loadDashboardData();
            }
        }

        //auto refresh the page every 30 seconds
        setInterval(() => {
            loadUsers();
        }, 30000);

        // Function to fetch and update the server time display
        async function updateServerTime() {
            try {
                const response = await fetch('/api/events/get_time');
                if (!response.ok) throw new Error('Failed