Added js validation for registration