1
00:00:01,590 --> 00:00:07,590
So we have a newly entered user in the database and we have what I hope is the correctly hashed password

2
00:00:07,590 --> 00:00:10,490
or the password hash, so let's test out our login screen.

3
00:00:10,830 --> 00:00:13,010
So let me get make sure my application is running.

4
00:00:13,050 --> 00:00:13,760
It is not.

5
00:00:13,770 --> 00:00:14,490
So let's run it.

6
00:00:17,030 --> 00:00:22,610
Let's reload this page to make sure the CSF token is up to date and first of all, let's try nothing

7
00:00:23,450 --> 00:00:26,900
and that worked and let's put in something I know is wrong at here.

8
00:00:26,920 --> 00:00:29,270
Dotcom with a password.

9
00:00:30,720 --> 00:00:33,090
And it gave me the correct message, which is good.

10
00:00:33,140 --> 00:00:35,230
Now let's try logging with the right information.

11
00:00:35,240 --> 00:00:42,080
And I used admin at admin dot com and I used the password password and hopefully this will Lagus in.

12
00:00:43,550 --> 00:00:44,060
Wow.

13
00:00:44,090 --> 00:00:44,990
That seemed to work.

14
00:00:45,560 --> 00:00:47,420
Now, clearly, there are some problems.

15
00:00:47,720 --> 00:00:50,510
This login should now say log out.

16
00:00:50,720 --> 00:00:54,680
So we have to have some means of determining whether or not the person is logged in.

17
00:00:54,680 --> 00:00:56,720
So we use the middleware we created for that.

18
00:00:57,320 --> 00:01:04,940
But we also need to modify the base, template the layout for the entire site to check to see if the

19
00:01:04,940 --> 00:01:09,130
user is logged in and to change this, to log out if they are.

20
00:01:09,170 --> 00:01:14,910
And then we also need to create a handler and the necessary code to actually log a user out.

21
00:01:15,410 --> 00:01:17,140
Fortunately, none of that is too difficult.

22
00:01:17,150 --> 00:01:19,550
So we'll take care of that in the next lecture.
