title: How to intercept an authentication request in ASP.net webform
body: <p>I have user's who are losing their data because they sit on a page too long, then are asked to log back in.  I want to do the following:</p>
  
  <p>1) Instead of redirecting them to a login page, I want to cancel the current request and give the user a popup dialog box to login with.</p>
  
  <p>2) When the login is successful, I want the user to be sent back to their form, with all data intact.  (Even better if the request could go through without sending them back to that form, but this is optional).</p>
  
  <p>How can I intercept these authentication requests, and present the user with a popup login?</p>
  
  <p>I am using ASP.net forms authentication.</p>