Modified validations on User entity. Added javadoc