             loginVC.errorHandler               = { error in
                errorHandler(error as NSError)
             }
+            loginVC.dismissLoginViewController = cancelHandler
             
             return loginVC
          }

      }
   }
   
   @objc public static func createLoginViewController(uiConfiguration: LoginComponentConfiguration=LoginComponentConfiguration.DefaultConfiguration(), successHandler:([String: String])->(), errorHandler:(NSError)->()) -> LoginComponentViewController? {
      let podBundle = NSBundle(forClass: LoginComponentViewController.self)
      if let bundleURL = podBundle.URLForResource("auth0LoginComponent", withExtension: "bundle") {
         if let auth0Bundle = NSBundle(URL: bundleURL) {

    - parameter presenter:       The `UIViewController` used as the presenter for the login view controller.
    - parameter uiConfiguration: The `LoginComponentConfiguration` object detailing the `UI` details for the controller.
    - parameter successHandler:  Success closure that will be called upon successful authentication. Passses the generated `AccessToken` object.
    - parameter errorHandler:    Error closure that gets called if something fails. Passes `Auth0LoginComponentError`s.
    */
   public static func presentLoginViewControllerWithPresenterController(presenter: UIViewController, uiConfiguration: LoginComponentConfiguration=LoginComponentConfiguration.DefaultConfiguration(), successHandler:(AccessToken)->(), errorHandler:(ErrorType)->()) -> Void {
      dispatch_async(dispatch_get_main_queue()) {
