Normally, you don't want to give any hints to malicious individuals, so don't tell them which field they have wrong. Otherwise it's a simple matter to harvest the usernames for a site. Normal practice is to simply tell them that their login is incorrect.
Secondly, you don't want to give them a nice tool for breaking your site (the bit you can with AJAX). So on the server side, be sure to put a time delay between login attempts, and possibly[1] lock the account after a few bad login attempts. Again, to prevent giving any clues, you probably don't want to tell the user that the account is locked. (Except by EMail, if they've registered an EMail address.)
...roboticus
When your only tool is a hammer, all problems look like your thumb.
Update: [1] As JavaFan notes, it's not necessarily a good idea to lock the account.
In reply to Re: real time server side validation
by roboticus
in thread real time server side validation
by yakoval
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |