             }
             break
         }
-
-        let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.dismissKeyboard))
-        view.addGestureRecognizer(tap)
     }
 
     func disableBackupPhotos() {


            let sftpSession = self.connectAndAuthenticate()

            if (sftpSession != nil) {
                for asset in assets {
                    counter += 1


            self.password.text = savedValue
        }

        self.checkAuthorization()

        let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.dismissKeyboard))
        view.addGestureRecognizer(tap)
    }

    func checkAuthorization() {
        let currentStatus = PHPhotoLibrary.authorizationStatus()

        switch currentStatus {
