finally ajax validation working for the registration form. Now only DB query needs some work