title: Swift: Show success screen after login
body: <p>Here is my code:</p>
  
  <pre><code>if(statusCode != 200) {
  
                  let jsonStr = NSString(data: data!, encoding: NSUTF8StringEncoding)
                  print("Error could not parse JSON: '\(jsonStr)'")
              }
              else {
  
                  print("Everything Looks good: \(responseData)")
                  self.performSegueWithIdentifier("login", sender: self)
  
              }
  
  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
          super.prepareForSegue(segue, sender: sender)
      }
  </code></pre>
  
  <p><code>performSegueWithIdentifier</code> does not do anything.</p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>print("Everything Looks good: \(responseData)")
                  dispatch_async(dispatch_get_main_queue(),{
                      self.performSegueWithIdentifier("logi‌​n", sender: self)
                  })
  </code></pre>
  
  <p>throws</p>
  
  <pre><code>2015-07-16 00:40:18.298 phoenix[2750:259334] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (&lt;phoenix.LoginViewController: 0x7fab62514d30&gt;) has no segue with identifier 'logi‌​n''
  *** First throw call stack:
  </code></pre>
  
  <p>It should not be the case, because
  <img src="https://i.stack.imgur.com/KOP9E.png" alt="enter image description here"></p>