title: Redirect users back to login if the session expired on single page application
body: <p>I have a web application that is heavily ajax based. I only have one 2 views which is the login and the main view itself, and the rest are PartialViews that will be called using ajax requests.</p>
  
  <p>If i put the session checkers inside the partialviews( through ActionFilters), it will return the login view and it will be displayed after my ajax is success which isn't my desired result since i want the mainpage itself to be redirected back to the login screen.</p>
  
  <p>one solution that i think of is using a javascript timeout that will check if the session/authentication still exist given a set of intervals but i don't know if that practice is good.</p>
  
  <p>Can someone suggest me what to do?</p>
  
  <p>I have 2 views which is the <code>login</code> and the <code>mainframe</code> then around 30 <code>PartialViews</code>.</p>