enableShutdownHook

Enable adding a Runtime.addShutdownHook to log out of the Gateway when the process is killed.