title: AuthenticationProvider authenticate called twice in IE and fails to login
body: <p>I have a custom <code>AuthenticationProvider</code> with the <code>authenticate</code> method.</p>
  
  <pre><code>    @Override
  public Authentication authenticate(Authentication authentication) throws AuthenticationException {
  
          &gt; Check username, password, throw exceptions where needed
  
          return new CustomAuthenticationToken(username, grantedAuthorities);
      }
  </code></pre>
  
  <p>And the token:</p>
  
  <pre><code>public class CustomAuthenticationToken extends UsernamePasswordAuthenticationToken
  {
       public CustomAuthenticationToken(ICurrentUserContext currentUser, List&lt;GrantedAuthority&gt; authorities) {
           super(currentUser.getUsername(), currentUser.getPassword(), authorities);
       }
  }
  </code></pre>
  
  <p>When I login with Chrome, Firefox, there is no problem whatsoever. </p>
  
  <p>In IE 8/9 I have a very weird problem. Sometimes it will only call the method <code>authenticate</code> one time, it will login and everything works as expected. But from time to time, it will call <code>authenticate</code> twice, and fails to log in.</p>
  
  <p>Does anybody have any clue?</p>
  
  <p>I've tested it on Tomcat btw.</p>