In my Database I've got a boolean is_logged's field. I made 3 events :
_ When the user log in, is_logged => true,
_ When the user log out, is_logged => false,
_ When the user is inactive during 30 min, the page is refresh with js and redirect to /logout, is_logged => false
One case is missing : When the user close the browser. When he does it, I would like my field is_logged => true but for this case I really don't know how to do it. Anybody's got a clue ?