Thus far with Passport we've created a sign-up form and submitted it to our server, and we responded appropriately based on whether or not our user sends us a valid email/password combination. And that's a good stepping stone, but it's not quite enough for an effective application. We need to prevent access to entire sections of our application based on whether or not the user is logged in.
In addition to that, we want to remove visual oddities like having the sign out link show up even if the user isn't logged in. Also, we want to hide the sign in link if the user already is logged in.
Well, sit right back, because these problems are exactly what we solve in this episode.