title: presentViewController from TabBarController to outside
body: <p>Here is my main StoryBoard:</p>
  
  <p><img src="https://i.stack.imgur.com/gR0FB.png" alt="Storyboard"></p>
  
  <p>As you can see there is a main TabBarController, but in Order to see the TabBarController user has to login first in (LoginViewController which is outside of main TabBarController this is the code in viewDidLoad of all my controllers in TabBar:</p>
  
  <pre><code>    if ( ![Client isLoggedIn] ) {
           UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:Nil];
           UIViewController* loginView = [storyboard instantiateViewControllerWithIdentifier:@"LoginScene"];
           [self.navigationController presentViewController:loginView animated:YES completion:nil];
           return;
      }
  </code></pre>
  
  <p>but sometimes(!) this doesn't work at all and application hangs (and when it happens even uninstalling the application doesn't help)</p>
  
  <p>What is the correct way to redirect user from TabBarController to another ViewController (LoginViewController) in this case, which is not a child of TabBarController?</p>