I've started to learn Swift 4 and iOS app development. 

I've set up a basic app that allows users to sign up and add themselves to a user table or log in and display the users that are already registered. I've created a bar button item (logout) in my main storyboard and have connected that button to the main user screen with a segue. I've also created a user table view controller with the function to logout the user. Here are the images of if the code, main storyboards, and segue and button definitions. 

The issue is that when I press the logout button in the app, the actual logout function is never called. I believe it works because it flashes the main user signup screen for a second (as per the segue), but that code is never executed. It just goes back to the main user table view. I added print statements (for the console) and breakpoints in the code but it never gets that far. Here's the code below. It's in the UserTableViewController.swift file.

import UIKit
import Parse

class UserTableViewController: UITableViewController {

```
//function to control what happens when the user presses the logout button

@IBAction func logoutUser(_ sender: Any) {

    // log the user out; make sure you import Parse into the view controller so you can access the PFUser functions
    print ("getting ready to logout user")

    PFUser.logOut()

    print ("logged out user from parse")

    // perform the segue to the main login screen; don't need self. before the performSegue because we want the action to happen in the main view controller

    performSegue(withIdentifier: "logoutSegue", sender: self)

    print("You should see the main screen now")

}

```

Thanks in advance for your help. Sorry for adding in the pictures earlier. 

Mike