Fix realm authentication to work in CI