I am working on one web application in which i want to make sure that website allow only one login per user at a time. 
when user login i am updating table column islogged=1 when logoff i am updating islogged =0
but the  problem is when user session timeout or if user closing browser i am unable to capture this events.i am using sqlserver state to store sessions so 
Session_End event is not fired in this state .
it only works in InProc State. and also in browser close event i have tried onunload event. but this event is fired on tab closed also. not able to differentiate tab close and browser close.
i want only one concurrent user login. is there any other way to achieve this.

i am using this code to capture browser close event.