This page demonstrates how to combine the detection of the session expired with re-login without page refresh.
It requires ColdFusion scripting enabled on the server.
More details on Session Expired and Ajax Form Submit.