should see login page similar to the one shown in figure - enter the username and password you set up earlierand you should be brought back to the index page the header on the home page should display greeting personalized with your username figure - the login page logging out now we need to provide way for users to log out we won' build page for logging outusers will just click link and be sent back to the home page we'll define url pattern for the logout linkwrite view functionand provide logout link in base html the logout url the following code defines the url pattern for logging outmatching the url urls py --snip-urlpatterns login page --snip-logout page url( '^logout/$'views logout_viewname='logout')the url pattern sends the request to the logout_view(functionwhich is named as such to distinguish it from the logout(function we'll call from within the view (make sure you're modifying users/urls pynot learning_logurls py the logout_view(view function the logout_view(function is straightforwardwe just import django' logout(functioncall itand then redirect back to the home page open users/views pyand enter the following code