Login when clearing RAM

I’ve created a mobile app in which you have to login in order to get to the other pages. Every time I reload the page I get back to the login page. I wonder if I fully convert my files in the .apk file will the same happen if the user has already logged in and once they clear the ram they have to login again? And if this can happen how can I fix it?

The code that sends you back to the login page:
app.component.ts file

export class AppComponent {
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private storage: Storage,
    public navCtrl : NavController
  ) {
    this.initializeApp();
  }
  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
    this.storage.get('storage_xxx').then((res)=>{
      if(res == null){
        this.navCtrl.navigateRoot('/home');
        //home is the login page
      }
      else{
        this.navCtrl.navigateRoot('/homepagee')
       //homepagee is the index page
      }
    });
  }
}