Added form validation using http://jqueryvalidation.org/.