I’m having trouble using a tab navigation application. Basically I start on this screen here

And when I click login, it will take me to this page on the same tab

However when I click logout, it takes me to the original screen which you see. BUT if I have logged out, and visit another tab, and then revisit the “profile tab” it is stuck in the second screen, and I can’t even click logout anymore, it seems as if the view is stuck on the stack perhaps? I use this in my first view controller to access the second:
-(void)Bootup{
FourthViewController *home = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil];
self.view = [home view];
}
and I use this in the second view controller
-(IBAction)switchPage:(id)sender
{
//[self someUpdateFunction];
FirstViewController *home = [[FirstViewController alloc] initWithNibName:@"FirstView" bundle:nil];
self.view = [home view];
}
Any ideas as to why I might be experiencing the problem?
To use for adding a view,
follow this code – [self.view addSubview:[controller view]];
And to remove – [self.view removeFromSuperview];