You can add the onsubmit handler for your login form. This handler can help you prevent submitting your form (and for example move your cursor to the next empty field in the forms);
To prevent form from submition, return false in your onsubmit handler;