Added unit tests for registering a user