Added some javascript form validation