Interesting thought indeed. I've had this problems with users that were writing something along the length of the bible in a textarea, and they were surprised when they found out that they were logged out in the meantime and naturally, that had upset them as they now lost the text they wrote. When I explain it's a security precaution, they will usually calm down, but I really feel bad for the users: there has to be a way around it.
I do agree with allspiritseve though: always asking them for their username and password will confuse the users of my applications, and very understandable too, I think I'd be confused just as well as my end-users. I mean, while writing this reply, I wouldn't expect that I'd have to pass along my username and password, as it already says: "Logged in as webaddictz".
I do, however, think there is a middle ground? When the form is submitted, check if there is a session, if there is not, save the information somewhere and redirect the user to a login page. After login, send them back to the form and let them submit again. No Ajax involved, and it will work on every browser.
You could, of course, create an Ajax variant too. Upon submittal of the form, do an Ajax call to see if the session is still alive. If not, ask the user to fill out username and password, and submit that with form. On the serverside, log the user in and save the form's value(s). That actually sounds like a nice idea.