support custom realms