Added validation on  registration and login pages