Fixed bugs when changing orientation in single-sign-on dialog.