Store the state in localstorage --> add a BaseCtrl which is around all our content and other controllers and views.
There you can listen on $stateChangeStart --> if user is already loggedin and the user tries to open a state, which needs no authorization --> make event.preventDefault() and go to your mainpage.
I add custom data to my states, so i can check easily if auth is required.
you also can put this on the data object of a state:
Another approach --> you can work with resolves in your app
So you could execute a api-request like “checkIfuserIsLoggedIn” in you base-state and if he is --> resolve the user objec in other cases resolve nothingt. In the base controller you can handle if the user is loggedIn or not.