Fixed logout which did not complete ok when using starttls.

Signed-off-by: Michel Verbraak <info@1st-setup.nl>