for logout when user close browser