     func clientPickerViewControllerDidCancel(clientPickerViewController: ClientPickerViewController) {
         finish()
     }
-    
-    func loginViewControllerDidCancel(loginViewController: LoginViewController) {
-        finish()
-    }
 }

import UIKit
import Storage
import Snap

protocol LoginViewControllerDelegate {
    func loginViewControllerDidCancel(loginViewController: LoginViewController) -> Void
}

/*!
The LoginViewController is a viewcontroller that we show if the user is not logged in yet.
It not clear yet what needs to be done so consider this a temporary placeholder for now.
*/

class LoginViewController: UIViewController {
    var delegate: LoginViewControllerDelegate?

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = UIColor.whiteColor()
        
        let label = UILabel()
        label.text = NSLocalizedString("TODO Not logged in.", comment: "")
        view.addSubview(label)
        label.snp_makeConstraints { (make) -> () in
            make.center.equalTo(label.superview!)
            return
        }

        navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Cancel, target: self, action: "cancel")
    }

    func cancel() {
        delegate?.loginViewControllerDidCancel(self)
    }
}

protocol ClientPickerViewControllerDelegate {
    func clientPickerViewControllerDidCancel(clientPickerViewController: ClientPickerViewController) -> Void

                self.sharedItem = item
                
                if self.profile == nil {
                    // XXX todo.
                } else {
                    let clientPickerViewController = ClientPickerViewController()
                    clientPickerViewController.clientPickerDelegate = self
