As I told you you need to make use of Session_End event of the Global.asax file.
You will have to store SessionId in the table and then delete using the SessionId
//To get SessionId
Session["Session"] = "session";
string s = Session.SessionID;
//To delete using SessionId in Global.asax
void Session_End(object sender, EventArgs e)
{
DeleteUserEntry(Session.SessionID);
}