         accessRequest(policy: policy)
     }
     
-    func dismissView(){
-        print("dismissing")
+    func authenticated() {
+        self.removeBlur()
+        NotificationCenter.default.addObserver(self, selector: #selector(SecureViewConroller.dismissView), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
+    }
+    
+    @objc func dismissView(){
         DispatchQueue.main.async {
             self.navigationController?.popViewController(animated: true)
             self.dismiss(animated: true, completion: nil)

        context.evaluatePolicy(policy, localizedReason: NSLocalizedString("settings access request", comment: "settings access request"), reply: { (success, error) in
            
            if(success) {
                self.removeBlur()
                print("Successfully logged in! 👍")
            }else{
                if let error = error {
                    switch(error) {

        }
    }
    
    
    func removeBlur() {
        DispatchQueue.main.async {
            self.blurEffectView.removeFromSuperview()
