If you set on Firefox to restore all your tabs and open it the next time you start Firefox, it saves all cookies regardsless what is set in the cookie expires field.
This causes major problems on a lot of applications.
To fix this, go into about:config and set:
browser.sessionstore.privacy_level = 2
This will ensure that the cookie is not stored.