     @IBOutlet weak var connectGmail: UIButton!
     
     @IBOutlet weak var connectedStatus: UILabel!
+    
     @IBAction func connectGmail(sender: AnyObject) {
         
         
         if (self.connectGmail.titleLabel?.text == "Connect") {
+            // Connect with Gmail
+            
             self.navigationController?.pushViewController(createAuthController(), animated: true)
+            print(self.navigationController?.navigationItem.rightBarButtonItem?.title)
+            print("pushed")
         } else {
+            // Disconnect
             GTMOAuth2ViewControllerTouch.removeAuthFromKeychainForName("Gmail API")
             self.connectGmail.setTitle("Connect", forState: .Normal)
             self.connectedStatus.text = "Not connected"
-            
-            print("remove auth")
+            print("Auth removed")
         }
         
         
     }
+    
     
     private let kKeychainItemName = "Gmail API"
     private let kClientID = "556205392726-s6pohtn44l7eqpgmf0qtjq8mp0crt1nd.apps.googleusercontent.com"

            finishedSelector: #selector(ProfileViewController.viewController(_:finishedWithAuth:error:))
        )
    }
    
    // Handle completion of the authorization process, and update the Gmail API
    // with the new credentials.

    // When the view appears, ensure that the Gmail API service is authorized
    // and perform API calls
    override func viewDidAppear(animated: Bool) {
        // If user alreay connected
        if let authorizer = service.authorizer,
            canAuth = authorizer.canAuthorize where canAuth {
            connectedStatus.text = "Connected!"
            connectGmail.setTitle("Disconnect", forState: .Normal)
        }
