refactored User registration process to make user of CommandBus and a UserRepository class