restore active window after requesting credentials (fixes #11355)