title: Electron: how to open an url in the same window and after the user do some action go back to application in the same window
body: <p>I have an Electron app that is displayed using <code>BrowserWindow</code>. I want to open an external URL in the same window so that the user can log in (to an external website) and after the user logs in it should display the Electron application again instead of the external website that the user used to log in.</p>
  <p>I've been able to open the external url in the same window by using:</p>
  <pre><code>&lt;a href=&quot;https://loginsite-example.com&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;
    site where you have to log in
  &lt;/a&gt;
  </code></pre>
  <p>However, I don't know how to show the Electron application again after the user successfully logs in to the external website. Also, I would like to keep the session from the external website so that I could consume its API inside the electron application.</p>