Improve validation on signup and login pages