added support for showing validation errors to the user on the view for login and register