Ionic 5 with Angular, Login and Home Page

Hi everyone

I have a query that I would like to help me solve, I am using Ionic 5 in a new application, when I log in, with navigateByUrl from @ angular / router I navigate to the Home page, but if I press the back button I return to the login page.

What I can do??

At some point I thought about making the Home page on the root page, but it seems that this is not possible in version 5.

Thank you for your answers

Did you tried using navController.setDirection('root') before navigating?