There are several different ways to do this. It just depends on the look you want to achieve.
I think the neatest way to do this would be to use a UIViewController with two container views, then embed your login view controller in one container view, and your tableview controller in the other container view.
After you create references to these containers in their view controller, you can animate each container view however you want to, such as sliding out the login view then hiding it. This way, your "master" view controller will always have a reference to both your tableView controller and your login view controller.
If you don't want to move away from the method of using modal transitions between view controllers, here is what I tell you:
There doesn't exist a "stack" of view controllers anywhere as you describe it. You will have to create one yourself, probably in the app delegate.
In order to do this, you will need to create a reference to the view controller you need a pointer for in your app delegate, make a property for it, and synthesize it. It would look something like this:
MyAppDelegate.h
@interface MyAppDelegate : UIResponder
{
MyViewControllerClass *myViewController;
}
@property (nonatomic) MyViewControllerClass *myViewController;
MyAppDelegate.m
@synthesize myViewController;
Then, in the viewDidLoad method of the view controller....
[[[UIApplication sharedApplication] delegate] setMyViewController:self];
After you set this up, you can check to see if a pointer to that view controller exists by saying
if([[UIApplication sharedApplication] delegate].myViewController)
{
//does exist
}
else
{
//does not exist
}
To access a method on that view controller, just say something like
[[[UIApplication sharedApplication] delegate].myviewController performMyMethod]
Hope that helps you.