added basic JS form validation