tests: fix the initial connection state to match the real world
IMAP: make sure that no task can possibly be activated prior to successful login