window.nexusAuth = {
    submitLoginForm: function (formId, email, password, rememberMe) {
        var form = document.getElementById(formId);
        if (!form) return false;
        
        var emailInput = form.querySelector('input[name="email"]');
        var passwordInput = form.querySelector('input[name="password"]');
        var rememberMeInput = form.querySelector('input[name="rememberMe"]');
        
        if (emailInput) emailInput.value = email;
        if (passwordInput) passwordInput.value = password;
        if (rememberMeInput) rememberMeInput.value = rememberMe ? "true" : "false";
        
        form.submit();
        return true;
    }
};
