$(document).ready(function() { 
    // check if login form is filled 
    $('#loginform').bind("submit",function(event) {
        if($('#username').val().length == 0 || $('#password').val().length == 0) {
            alert('Both "User" and "Pass" are required to Log In.');
            event.preventDefault();
        }
    });
});
