         self.showMainScreen(currentUser!)
     }
 
-    func showMainScreen(_ user: User) {
+    @discardableResult
+    func showMainScreen(_ user: User) -> Promise<Void> {
         Tracker.shared.identify(user: user)
 
         let vc = ElloTabBarController()
         ElloWebBrowserViewController.elloTabBarController = vc
         vc.currentUser = user
 
-        swapViewController(vc) {
+        return swapViewController(vc).always {
             if let payload = self.pushPayload {
                 self.navigateToDeepLink(payload.applicationTarget)
                 self.pushPayload = nil


        let parentNavController = ElloNavigationController(rootViewController: loggedOutController)

        swapViewController(parentNavController) {
            if let deepLinkPath = self.deepLinkPath {
                self.navigateToDeepLink(deepLinkPath)
                self.deepLinkPath = nil
            }
        }
    }


// MARK: Screen transitions
extension AppViewController {

    @discardableResult
    func swapViewController(_ newViewController: UIViewController) -> Promise<Void> {
        let (promise, resolve, _) = Promise<Void>.pending()
        newViewController.view.alpha = 0

        visibleViewController?.willMove(toParentViewController: nil)
