small validation code changes in user model