                             } else {
                                 performSegueWithIdentifier("presentOAuth", sender: providerName)
                             }
-                            
                         }
                     }
                 }

                            if isOperatingSystemAtLeastMajorVersion(9) {
                            
                                self.socialAccount = SocialAccount(rawValue: providerName)
                                
                                var accessToken = ""
                                
                                if let token = YepUserDefaults.v1AccessToken.value {
                                    accessToken = token
                                }
                                
                                if #available(iOS 9.0, *) {
                                    let safariViewController = SFSafariViewController(URL: NSURL(string: "\(socialAccount.authURL)?_tkn=\(accessToken)")!)
                                    presentViewController(safariViewController, animated: true, completion: nil)
                                    
                                    oauthComplete = {
                                        safariViewController.dismissViewControllerAnimated(true, completion: nil)
                                    }
                                } else {
                                    performSegueWithIdentifier("presentOAuth", sender: providerName)
                                }

    }
}

// MARK: - NSURLConnectionDataDelegate

extension ProfileViewController: NSURLConnectionDataDelegate {
    
    func prepareForOAuthResult(notification: NSNotification) {
        
        oAuthCompleteAction?()

        if let result = notification.object as? NSNumber, socialAccount = self.socialAccount {
            if result == 1 {
                
