You could also set your browser to delete cookies upon closing. That's what I do. The only downside is I lose cookies I'd rather keep, but such instances are rare, and I'd rather destroy all the cookies.
Also, I just found this extension for Firefox:
https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/I have no idea how well this addon works. I've never used it before. YMMV
I seem to recall reading somewhere, though, that Mozilla was going to make that sort of thing a default feature of the browser in a future update. Not sure.
ETA: I've installed that addon and tried it out. It seems to work. You have to read the instructions and set it up first, but once you do that, it seems to work as advertised. I created a "Jeff Tanyard" container and assigned the dollar-sign icon to it. When I open a new tab in this container, it shows it in the URL field.
It takes some getting used to, but I think I might like this addon. In the past, I've logged into my author Gmail account while listening to music on YouTube in another tab, and it shows me as being logged into my author account on YouTube, something I don't really want because I don't want to accidentally like/dislike something with an errant click under my author name. Now I can use Gmail in a container tab and not have to worry about my logged-in status encroaching on other tabs.