Firebase login failure causes ionViewDidLoad to be executed multiple times

Hello,

I am developing a web app with ionic v3 and firebase database as a backend. I have successfully developed the login procedure, though I observed something strange.

The concept: If the credentials of the user are correct then the user gets navigated to page 2 with setRoot method. If not, the user stays at login page.

The issue: Let’s say that the user gives wrong credentials a couple of times (so the user stays at login page) and then gives the correct ones (so the user gets navigated to page2). When page 2 is loaded, I can see (in the console) that ionViewDidLoad is called several times.

Is this normal? Am I doing something wrong?