added unit tests for email registration