Also,
If it mainly happens on long posts your "session" could be timing out.
Your log-in lasts for 1 hour between page views (if you don't request a web page from the site in an hour, the next page you request will be the log in page because you'll be logged out).
There are a couple of ways to combat this:
1. Enable cookies and especially "always allow session cookies" in your security options (for Internet Explorer: click [tools (menu)], [internet options (menu)], [privacy (tab)], [advanced (button)].
Then select override automatic cookie handling, check accept first party cookies and always allow session cookies.
2. Tick the "remember me" checkbox when logging in
3. Use your back button (before logging in), on most machines, all of your text will still be there and you can copy it, then log in then paste it back into the site when you've logged in.
4. Copy any really long posts before pressing submit then paste them back into the site if you get logged out! - I'm doing this right now even though this site has never logged me out!
Hope this helps,
Andy