title: Sharepoint 2013 "_layouts/15/closeConnection.aspx?loginasanotheruser=true" returning several login prompts
body: <p>In my sharepoint 2013 farm application there is some cases that I need to force the current user to logout. </p>
  
  <p>I'm using windows authentication, so, to do that, I'm usign the close connection url:</p>
  
  <blockquote>
  <pre><code>https://&lt;mysite&gt;/_layouts/15/closeConnection.aspx?loginasanotheruser=true
  </code></pre>
  </blockquote>
  
  <p>It does the job, the user session terminates and a login prompt(image below) appears.
  <a href="https://i.stack.imgur.com/qh2Sc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qh2Sc.png" alt="login prompt"></a></p>
  
  <p>So far so good the problem is even when the user enters the correct credentials, this login prompt keep appearing several times. Sometimes it appears 11 or 12 times, forcing the user to insert the credentials each time.</p>
  
  <p>The image below shows the network tab returned by the page. Each <em>"access denied"</em> line seems to be a prompt.</p>
  
  <p><a href="https://i.stack.imgur.com/MTuyk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MTuyk.png" alt="multiple prompts"></a></p>
  
  <p>This prompt is not related to the code, maybe it's something related with the server configuration, but I have no idea what could be.</p>