 
 class MainTabBarController : UITabBarController {
     
+    // Ensure first alert is always shown
+    var lastAlertTime = NSDate(timeIntervalSince1970: 0)
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         self.view.backgroundColor = UIColor.whiteColor()

            object: nil,
            queue: NSOperationQueue.mainQueue(),
            usingBlock: { _ in
                self.showNetworkErrorAlert()
                if !CredentialManager.sharedInstance.hasCredentials() {
                    self.presentLoginView()
                }

            delegate: self,
            cancelButtonTitle: NSLocalizedString("Dismiss", comment: "Button to dismiss network error message box")
        )
        lastAlertTime = NSDate()
        alert.show()
    }
}
