title: Spring security opening a popup login
body: <p>Someone knows how to open a popup login to authenticate (using spring security) when the user does something that needs to be authenticated and he is not.</p>
  
  <p>For example: Lets imagine the page has one button "buy now" that add the product to the cart and perform the checkout (buy now page), if the user is already authenticated, or, opens a popup for the user perform the authentication. </p>
  
  <p>If the authentication is successful than the spring redirects to the "buy now" page or stays in that page with the popup opened (with an error message "wrong login").</p>
  
  <p>I already searched in google for a kind of solution but without luck.</p>
  
  <p>Someone can point me in the right direction?</p>
  
  <p>Thanks</p>