Refactored progressdialog. Shifted to OAuth2.