Best way to implement login form in SPA?

Hi, i want to build a admin panel website by using Angular or React. However i am confusing about should it be a SPA or use a rounter setup, because i want all the user/admin need to login first and then they can view the website. So here is 2 way i can think of:

1. Use rounter link
Just like the normal website, use url to separate 2 parts /login and /main.

2. Use SPA & ngIf
Just like the normal SAP approach, import and loaded every component when user access the website and something like this

//Angular html
<div>
    <login *ngIf="isLogined"></login>
    <div *ngIf="!isLogined">
        <menu></menu>
        <router-outlet></router-outlet>
    </div> 
<div>

I am not sure which one is better. As this is just a admin panel, no need any SEO but need to be security as i don’t want anyone can change the value of isLogined and show up all the things behind. Please give me some advice or any other way to do it with Anuglar or React