Fix showing multiple dialogs on orientation change.
Refactor checking play services and network connection.