In appdelegate make your loginView as rootView controller, after login make your tabBar as rootView and at the time of logout remove tabBar from rootView and make loginView to as rootView.
or
in .h file
@property (nonatomic,retain) UITabBarController *yourTabBar;
Make function to add tabBar instance -(void)addTabBar
in app delegate this method add your all view to tabBar, Dont add this as subView to window,just make it.
And add your LoginView as rootViewController.
after login add tabBar as subView
TUTAppDelegate *appdelegte =(TUTAppDelegate*)[[UIApplication sharedApplication]delegate];
[[appdelegte window]addSubview:[[appdelegte yourTabBar]view]];
and at logout button
TUTAppDelegate *appDelegate = (TUTAppDelegate *)[[UIApplication sharedApplication] delegate];
[[[appDelegate yourTabBar] view]removeFromSuperview]