OPAL-2455: Replace window location before invalidating session