How to logout my application when I closed the window? In my chat application i am having the logout button and it works fine. Now I need to logout the application when I closed the browser window also..How can I achieve this... How to logout my application when I closed the window