       alert("Invalid username or password");
                    }
                }
            })
            .catch(error => {
                alert(error.message);
            });
            return false; 
        }

        document.addEventListener('DOMContentLoaded', () => {
            const userLang = navigator.language || navigator.userLanguage;
            const lang = userLang.startsWith('es') ? 'es' : (userLang.startsWith('zh') ? 'zh' : 'en');
            document.getElementById('languageSele