title: Cordova plugin InAppBrowser does not open a second time
body: <p>I'm working on a project using Ionic Framework and Phonegap. I need to use OAuth 2.0 for authentication on my app. When I try to login, the app opens an InAppBrowser window inside the Cordova WebView and loads the consent page. Everything works fine until then.</p>
  
  <p>The problem lies when I close the window and try to open it again, it simply doesn't open! What could it be?</p>
  
  <p>This is in my controllers.js file:</p>
  
  <pre class="lang-js prettyprint-override"><code>var ref = $window.open(oauthUrl, "_self", "location=yes");
  
  ref.addEventListener("loadstart", function () {
    // ...
    // do some logic
    // ...
  
    ref.close();
    $state.go("login");
  });
  
  ref.addEventListener("exit", function () {
    ref.close(); 
    $state.go("index");
    $window.location.reload();      
  });
  </code></pre>
  
  
  
  <p>I've already tried to remove the <code>ref.close()</code> lines, put <code>ref.show()</code>, but none of these work.</p>