Before doing anything drastic, have a look at some of your Firefox settings. Go to Options, then Privacy, and then look at settings for cookies and for clearing history.
Staying logged in to a site normally requires you to allow it to set cookies, and for the cookie to be allowed to remain on your computer after you close the browser. So if your normal setting is to block cookies, or to delete them when the browser closes, you need to make sure that the sites you want to stay logged in at are saved in the Exceptions list.
Then, if you set Firefox to clear history when it closes, you need to consider some of the settings there as well:
(a) If you allow all cookies without exception, but ask Firefox to clear them when it closes, you will lose your log-ins. (If you normally restrict/block cookies but allow some with Exceptions, I think this may still clear the ones in Exceptions.)
(b) Active logins - if ticked, you'll lose them.
(c) Site preferences - if ticked, you'll lose the cookie exceptions list, and thus, depending on the other settings, possibly your log-ins too.
It's all a bit complicated - I've recently been reviewing my cookie settings and it's not always easy to work out what all the options do.
Arthur