As we have already created an HTML form in one of our previous recipes, we will just update it to implement login and logout mechanisms using the gorilla/securecookie package.
See the Implementing login and logout in web application recipe in Chapter 2, Working with Templates, Static Files, and HTML Forms.