 
         var vc = ElloTabBarController.instantiateFromStoryboard()
         vc.setProfileData(user, responseConfig: responseConfig)
+        if let payload = pushPayload {
+            vc.selectedTab = .Notifications
+            pushPayload = .None
+        }
+
         swapViewController(vc) {
             if let alert = PushNotificationController.sharedController.requestPushAccessIfNeeded() {
                 vc.presentViewController(alert, animated: true, completion: .None)

    var visibleViewController: UIViewController?
    private var userLoggedOutObserver: NotificationObserver?
    private var systemLoggedOutObserver: NotificationObserver?

    override public func viewDidLoad() {
        super.viewDidLoad()
        setupStyles()
        setupNotificationObservers()
    }

    deinit {

            self.presentViewController(alertController, animated: true, completion: nil)
        }
    }
}

// MARK: Push Notification Handling
extension AppViewController {
    func receivedPushNotification(payload: PushPayload) {
        if let vc = self.visibleViewController as? ElloTabBarController {
            vc.selectedTab = .Notifications
        } else {
            self.pushPayload = payload
        }
    }
}


