title: Swift performSegueWithIdentifier not working
body: <p>I am trying to switch view controllers after a user successfully logs in to their account, but it is not working correctly. I cant use a segue directly because if the login button is clicked it will go to that view controller regardless if the information is correct or not. I have tried everything that I know of with no success. This is the code I am trying. </p>
  
  <pre><code>   @IBAction func loginTapped(sender: AnyObject) {
  
      let username = usernameField.text
      let password = passwordField.text
  
      if username.isEmpty || password.isEmpty {
          var emptyFieldsError:UIAlertView = UIAlertView(title: "Please try again", message: "Please fill in all the fields we can get you logged in to your account.", delegate: self, cancelButtonTitle: "Try again")
          emptyFieldsError.show()
      }
  
      PFUser.logInWithUsernameInBackground(username, password:password) {
          (user: PFUser?, error: NSError?) -&gt; Void in
          if user != nil {
              self.performSegueWithIdentifier("Klikur", sender: self)
          } else {
              if let errorString = error!.userInfo?["error"] as? String {
                  self.errorMessage = errorString
              }
  
              self.alertView("Please try again", message: "The username password combiation you have given us does not match our records, please try again.", buttonName: "Try again")
          }
      }
  
  }
  </code></pre>
  
  <p>I have the storyboard ID set to "Test" and it is not switching view controller when the correct information is entered. Can somebody help me resolve my problem? </p>
  
  <p><a href="https://i.stack.imgur.com/PgvYn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PgvYn.png" alt="Here is the code for the LoginViewController"></a>
  <a href="https://i.stack.imgur.com/pxzfY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pxzfY.png" alt="Here is the attributes panel for the KlikurTableViewController"></a></p>