Welcome back.
Now, what we need to do is that we need to work on the logout.
So if I click on logout, nothing is going to happen.
So we need to activate this manner.
So if we go to the account, that will be you will find that we have a button called logged in and here
we have a trip.
We need to say your account that HP and then we need to add question mark and then logout is equal to
one.
And then I'm going to go to the here in the account at the top.
I'm going to say if.
Is sex.
It is said get.
It is set.
Get log out.
Log.
Out.
And then I'm going to say if.
Is set.
Session.
Session logged in.
Log in.
If a user is locked in, then we need to log them out and to log of the user out.
We need to unset the session when on set session.
User logged in first logged in, but this is not enough.
We need also to unset the user email and and the user and the user username.
In other words, we need to delete the user name and the email because they logged.
So I'm going to see on said session user email.
And also I'm going to say on set.
Session.
User name.
And lastly, I'm going to say, hey there.
And then location.
And then a log in that BHP.
So this is going to take the user to the log in page one more time.
And finally, we just need to exit leaving.
Now save and let me hand it over to the browser to test.
So now in the browser I'm logged in.
Let me first refresh Illini click on logout.
If you click on log out, I will be taken to the login page.
So it worked successfully.
And you can't.
There's not even one more time if you want.
So let me test one more time.
I'm going to log in one more time and then now I'm logged in.
Let me click on log out.
If I click on Logout, I will be taken to the login page.