Properly compute Realm URI