Fixed imaplib.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED