add a flag to be able to close the session
Merge remote-tracking branch 'refs/remotes/kali/bug/4925_close_session' into develop