added js validation for sign in and registration