Adding a way to disconnect the IMAP socket