How to remove a modal page from NavigationStack in Xamarin.Forms
<p>Here's an example for my <strong><code>Navigation</code></strong>:</p>

<pre><code>LoginPage ( Login_Click  ) -&gt; MainPage   | Block BackButton
MainPage  ( Logout_Click ) -&gt; LoginPage  | Block going back to the MainPage
</code></pre>

<p>Currently I am using this code to show the <code>MainPage</code> after a successful login.</p>

<pre><code> await Navigation.PushModalAsync(new MainPage());
</code></pre>

<p>I <strong>DON'T</strong> want the users to go back by hitting the <code>PreviousButton(Android)</code> to return to the LoginPage.</p>

<p>Same story when logging out. </p>

<p>Is there a way to remove the LoginPage from the NavigationStack after a successful login (and remove the MainPage when logged out) ?</p>

<p><strong>NOTE:</strong> </p>

<p>This is modal. 
I am not using a NavigationPage.</p>