Fix cases where imap tag is more than 6 characters during logout request