Make the validation of filled User name and password by JS instead of PHP.
(The meaning is we doing it on client side and not on the server side, this is much better).