my webpage is using frames. whenever it detects user closing the windows or log out, it will display a pop up 'thank you message' prompt. the page also has timeout mechanism which will inform user that time elapsed and will redirect page to login page. the problem is that is triggered the 'thank you' pop up message and stalled the redirection. how can i redirect to login page first, then display the 'thank you' pop up message?