Is it possible to execute a function before the session will be destroyed in Express-session middleware?