Username:  
Password:  
You can do both client-side and server-side validation. If your page is valid your AJAX request will be processed by the server.