title: Logout not working on browser close, with multiple tab opened
body: <p>I am doing a SAML based authentication and want my user to be logged out of the system in case he closes the browser: I have written the following browser side code:</p>
  
  <pre><code>window.onbeforeunload =function(e){
  
  deleteAllCookies();
  
  var my_form=document.createElement('FORM');
  my_form.name='my_form';
  my_form.method='POST';
  my_form.action="sessionExpired.do";
  
  var hiddenText=document.createElement('INPUT');
  hiddenText.type='HIDDEN';
  hiddenText.name='crash';
  hiddenText.ID='crash';
  hiddenText.value='yes';
  my_form.appendChild(hiddenText);
  
  my_form.submit();
  
  return;
  
  
  };
  </code></pre>
  
  <p>This code calls my logout service and able to logg out of the system, in case one tab is opened, but the same doesn't work if along with my application multiple other tabs are opened.i.e in case of multiple tab, my server code gets called which invalidates session, but still session remains logged in and is not asked for authentication again.</p>