 
 public typealias LoginResult = Alamofire.Result<AuthData>
 
-fileprivate final class LoginViewController: SFSafariViewController {
+public protocol LoginViewControllerable: class {
+	var replacedRootViewController: UIViewController? {
+		get set
+	}
+}
+
+fileprivate final class LoginViewController: SFSafariViewController, LoginViewControllerable {
 	// Hold reference to the view controller that's temporarily replaced by the login view controller
 	var replacedRootViewController: UIViewController?
 }
 
+
+
 public protocol LoginDelegate {
 	var window: UIWindow? { get }
 	func login(url: URL) throws
+	func createLoginViewController(url loginURL:URL) -> UIViewController
 }
 
 // MARK: - Extension

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

			}
		}
	}
    
	func createLoginViewController(url loginURL:URL) -> UIViewController {
		return LoginViewController(url: loginURL)
	}
    
}
