 	
 	public var loggingIn: Bool {
 		get {
-			if let _ = window?.rootViewController as? LoginViewController {
+			if let _ = window?.rootViewController as? LoginViewControllerable {
 				return true
 			}
 			else {

		}
			
		// Replace current root view controller with Safari view controller for login
		let loginVC = LoginViewController(URL: loginURL)
		loginVC.replacedRootViewController = window.rootViewController
		window.rootViewController = loginVC
	}
	

				if let loginURL = OAuth2Manager.sharedInstance.authorizationURL, window = self.window {
				
					// Replace current root view controller with Safari view controller for login
					let loginVC = self.createLoginViewController(URL: loginURL)
					if let loginVC = loginVC as? LoginViewControllerable {
						loginVC.replacedRootViewController = window.rootViewController
					}
					window.rootViewController = loginVC
				}
				fulfill()
