Fix IMAP.login() to work properly.
Also, add remote tests for imaplib (part of #4471).
3 files changed