Fixed registration and login form validation