Header bar issue when changing view

I’m working on an app using the side menu template. The app works fine when I switch views, but I have a logout button on the side menu that once clicked it will go to a logout route, do what it needs to do and go to the main app route. But after I do that the header bar goes away.

After the logout route redirects you to the main route

Initial bar

Any idea on how to solve this issue?