properly close all groupchats on exit