# Catch nav guards during tab navigation

**URL:** <https://forum.ionicframework.com/t/catch-nav-guards-during-tab-navigation/93545>\
**Category:** ionic-v3\
**Created:** [June 8, 2017, 10:52pm UTC](https://forum.ionicframework.com/t/catch-nav-guards-during-tab-navigation/93545 "2017-06-08T22:52:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [June 8, 2017, 11:01pm UTC](https://forum.ionicframework.com/t/catch-nav-guards-during-tab-navigation/93545/2 "2017-06-08T23:01:14Z")

</div>

This seems like a confusing design to me. One of my UI rules is “don’t provide a way for users to do things I don’t want them to do”, so I would do away with the guard and simply not show any elements that would attempt to log in if you don’t want that happening.

I also think it’s confusing to have all these login forms all over the place.

If you want to support guest users, then have the Account page be a chimera of user preferences (if logged in) or a login form (if not). That way there is no concept of “the Login page”, no guard needed, and no problem.

If you don’t need to support guests, then merely switch the top-level `rootPage` to either `DashboardPage` (tab container) or `LoginPage` depending on login status. If you search the forums for `logout user:rapropos`, you will probably find a bunch of posts like [this one](https://forum.ionicframework.com/t/how-to-handle-case-where-user-is-still-authenticated-they-can-skip-login/92563/2) containing sample code for how I handle user authentication.

---

_[View the full topic](https://forum.ionicframework.com/t/catch-nav-guards-during-tab-navigation/93545)._
