When I launch the browser, it activates a wireless connection, but it doesn't disconnect when I quit the browser.
How do I turn wifi off after a session?
You are misunderstanding something. Things doesn't work like that. Whenever pi is booted ,by default it automatically connects you with the wifi. And it stays open unless you close the connection. You can close the connection with a left click on the network menu.
You can create a shortcut which opens your browser and deactivates wifi:
browser && iwconfig wlan0 down
browser with your browser.