Hi Olu,
When the user closes their browser no indication of this is sent to the server.
So you can't take any action on this.
This is why banks always encourage you to do an explicit logout. If you close the browser without logging out then the session is still logged in until the session expires.
cheers
Bruce