added unit tests for user validation