title: Cordova backbutton press from inappBrowser
body: <p>I was developing a cordova app,which contains a login logout functionality.
  The bug is when the user logs out of the app. The logout button calls inAppBrouser plugin to load logout page (from an external web source) after the logout success it stays in the same logout screen, when the user press back button it returns to main screen (from where he logged out), I want to close application there (the page he is going back is supposed to be displayed after login)</p>
  
  <p>I tried clearing the history when inappBrowser gets loaded, </p>
  
  <pre><code>history.go(-(history.length - 1));
  </code></pre>
  
  <p>but no luck!</p>
  
  <p>from the cordova documentation as JesseMonroy650 said I tried overriding the backbutton press which is not working inside inappbrowser</p>
  
  <p>but the 'exit' eventListener I added seems to be working...</p>
  
  <pre><code>window.addEventListener("exit", function () {
   navigator.app.exitApp();
  });
  </code></pre>
  
  <p>the app sometimes exits evens before the back button is pressed.
  the problem with the listener </p>
  
  <p>help&amp; Advises needed.</p>