SignInManager.PasswordSignIn is too slow
<p>I'm running a website based on asp.net mvc 5. My website implements an authentication mechanism (email address with password). My database is stored in Azure SQL.</p>

<p>As part of my login method, I'm using this code:</p>

<pre><code>// ...
var result = await SignInManager.PasswordSignInAsync(user.UserName, model.Password, model.RememberMe, shouldLockout: true);
</code></pre>

<p>This code line takes 35 seconds to be executed (!). This is too much... In the user experince, it seems like the web page is stuck. </p>

<p>I also tried the Non-Async code, also the same experience:</p>

<pre><code>var result = SignInManager.PasswordSignIn(user.UserName, model.Password, model.RememberMe, shouldLockout: true);
</code></pre>

<p><em>I found that</em> this slow behaviour is happening only on the <strong>first login attempt</strong>. On the second login attempt, it's very fast (&lt;1 second). If you leave the website running for a while, it became slow again for the first login.</p>

<p>How to fix this and make it faster? What should I check?</p>