After pondering on leatherback's response, I have realized that the $_SESSION variable is set while processing the AJAX request at the PHP level and not at the AJAX response phase (duh-uh).
Also, I have gotten around the repagination by actually making all the parts that were supposed to be downloaded from the server as static HTML enclosed in <div></div> where a style to control display is set to either "block" or "none" depending on the "submit" button and the content of the $_POST.
In general, I guess the technique that worked for me is to expire the page and force to refresh the page when the back button is pressed and with the method described above will always ensure that the page is painted correctly.
Thanks a lot.