If the IMAP connection was dropped during login, the error display would include the username and password. This fix omits the query if the command is 'login'.
IMO, this should probably trigger a release since some people probably would consider this to be a security flaw.