This Firefox extension allows that:
Multifox is an extension that allows Firefox to connect to websites using different user names. Simultaneously!
For example, if you have multiple Gmail accounts, you can open them all at the same time. Each Firefox window, managed by Multifox, accesses an account without interfering each other
Each Multifox window is flagged with a number indicating the identity profile. Logins made in windows with different numbers are isolated.
Logins are preserved the same way they are in “regular” windows. Even if you close the window or quit Firefox.
The identity profile of each window is preserved when Firefox restores the session.
It can also easily switch between profiles: