@Mike of SST is right, but for some reason of yours,
You can do the following
- Add another column along your [Login] flag, say DateTimeOfLogin value of when the user has been logged
- On your application side, add a function that periodically (says every 10 secs or as you preferred) updates that DateTimeOfLogin column (for optimum performance use thread on this)
When the user try to re-login and the [Login] flag is true and the difference between DateTimeOfLogin value is more than 10 secs then it means either your application is terminated or not properly shutdown or a power failure has been occured.