Navigation breaks down when dynamically showing/hiding tabs

Here is a small application built based on the original Ionic tabs example. There are two issues here. One is that ng-hide and ng-show are being completely ignored, forcing me to use ng-if to add/remove tabs. I’m thinking because of that I am having the second issue. The app loads, correctly stating I’m not logged in. Use the login tab to log in, and then log out. The controller does $state.go("tabs.home") but the view shown is for contact page. Any pointers?