Server side validation implemented for login and rego.