title: Show login JS popup for auth required actions
body: <p>I want to show a login popup, kind of overlay handled by JS when user clicks on any button/link which requires user to be logged in.
  For Eg: If user tries to comment without signing in, on click of post I have to show this popup.</p>
  
  <p>This is not ajax call where I can just reveal the popup based on the server response.</p>
  
  <p>Is there a way to do this? Maybe by checking the status code or something like that?</p>
  
  <p>The challenge is, when user is logged in the specific action takes user to another page, but when user is not logged in I want to suppress this and instead show login popup in same page.</p>