Login/logout

hi everybody, im new to this forum but not very very new to ionic, i worked with angular and its very similar,
my question is that,
when im logged in and the url is like this => http://localhost/ => then it has to redirect to home ONLY if im logged in.
if im not logged in and the url is like this => http://localhost/ => then you have go back to the login page, and the side-menu only has to appear when im logged in.

i can’t continue becaus im stuck with this and i dont know what to do, with this project im not using database with this one first i wanna do it without database.

loginpage.ts
Login(){
if (this.username == “admin” && this.password == “admin”) {
this.navCtrl.navigateRoot("/home")
}else{
this.ErrorMessage();
}
}

loginpage.html
<ion-content padding>

<ion-item>

<ion-label>Username:</ion-label>

<ion-input [(ngModel)]=“username”></ion-input>

<ion-icon name=“person” item-right></ion-icon>

</ion-item>

<ion-item>

<ion-label>Password:</ion-label>

<ion-input [(ngModel)]=“password” [type]=“passwordType”></ion-input>

<ion-icon [name]=“passwordIcon” (click)=“ShowHidden()” item-right></ion-icon>

</ion-item>

<div>

<ion-button expand=“block” (click)=“Login()”>Login</ion-button>

</div>

thanks in advance