In a user-authenticated application, provide the user with the ability to re-login if the session has timed out prior to submitting a POST request.
→
The AJAX login form provides a mechanism that impedes the normal request to the server until the user has re-logged in, as verified by the status code of submitting the login form.
This way, the user does not lose the POST data when taking a long time to fill out the form.
Finally, this solution degrades nicely: if Javascript is not available, the user will still be able to fill out the form, they just run the risk of data loss on some edge cases.