title: Cannot login after editing email addresses
body: <p>I have <em>Gerrit v3.0.0</em> running on my server, everything was working fine yesterday.</p>
  
  <p>Here's my authentication method :</p>
  
  <pre><code>[auth]
      type = http
      emailFormat = {0}@domain.com
  </code></pre>
  
  <p>I'm not sure that this is the cause of my problem but I might have deleted my email address xxx@domain.com yesterday.
  Today when trying to log in to the UI again, I get a HTTP 403 error and <code>logs/error_log</code> said :</p>
  
  <pre><code>Cannot assign external ID "username:xxx" to account 1000003; external ID already in use.
  </code></pre>
  
  <p>So I went ahead and deleted external IDs for this account which was probably a mistake since I still got the HTTP 403 error and the following messages in <code>logs/error_log</code> :</p>
  
  <pre><code>[HTTP-71] WARN  com.google.gerrit.server.account.AccountManager : Email xxx@domain.com is already assigned to account 1000001; cannot create external ID gerrit:xxx with the same email for account 1000057.
  [HTTP-71] ERROR com.google.gerrit.httpd.auth.container.HttpLoginServlet : Unable to authenticate user "xxx"
  com.google.gerrit.server.account.AccountException: Email 'xxx@domain.com' in use by another account
  </code></pre>
  
  <p>So it seems as if Gerrit tries to create a new account instead of logging into mine.</p>
  
  <p>Note that there is another user on the instance and he can still use Gerrit UI.
  I've searched some previous topics but no solutions seem to work.</p>