So we have this login form and now we want this to display when people click on the login link, and
that's pretty easy.
But first I see that I didn't change this to password.
So the four part of the four attribute of the label tag should have been for password, and it is now.
So if you recall, we actually in our base layout, which is right here, we set up a route that's going
to be user login.
So we need to create a route for that.
And then we need to create a handler and then we need to display this login page and we know how to
do that.
So let's open our routes file and let's put it right down here.
Mux doGet and the path is slash user slash login and it will go to handler stort repo dot show login,
which doesn't exist, but we can do that right now.
So let's go to our handler page, which is under packages.
Handlers, handlers, dutko, and at the very bottom, I will simply put in a new function that has
a receiver of the repository type.
And I'll call that show Log-in, and it will take, as do all handlers, as all handlers do, a response
writer.
And a pointer to an HTTP request.
OK, and all I want that to do right now is just to show that login page and we know how to do that.
We can just go render DOT template and it requires a W and R the template string, which I called log
in page dot temple and for now I'll give it an MTD.
So models template data analyst, leave that empty and that should be enough to render this template.
So let's stop our application.
If it's running, clear it, run it and make sure this actually works.
Back to my Web browser, reload the page to make sure everything's current and there it's not working,
user log in, excreting content, no pointer.
Oh yes, I'm going to give it an empty form.
OK, so let's go back to our login handler, which is over here and give it an empty for.
Form form new Nhill.
Stop the application.
Start the application and let's try that again, reload this page and there's my login form, not very
pretty, but we can make it prettier later.
All right.
So that gets that going.
Now, we need to think about what happens when someone actually fills this form out.
We need to authenticate the user.
And, of course, we're going to do that using our user table in the database.
And we have some work that we have to do before we can actually do that authentication.
And we'll take care of that in the next lecture.