Adds support for auto-registering into an environment.