 			}
 		}
 	}
-}+    
+	public func createLoginViewController(URL loginURL:NSURL) -> UIViewController {
+		return LoginViewController(URL: loginURL)
+	}
+}

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

		defer {
			OAuth2Manager.sharedInstance.authenticationCompletedWithResult(result)
			if let window = self.window,
				currentRootViewController = window.rootViewController as? LoginViewControllerable,
				replacedViewController = currentRootViewController.replacedRootViewController {
				
				window.rootViewController = replacedViewController
