read the data from form and added initial validations
added ajax call to validate credentials