I'm developing a system that stores in the database when user logs in and out. However, the logout function is only called when the user clicks exit.
I would like to know if you can call the logout function when the browser closes or the session ends.