     
     func forgotPassword()
     {
+        UIApplication.shared.keyWindow!.endEditing(true)
+        
         let alert:UIAlertController = UIAlertController(
             title:
             NSLocalizedString("Enter your Email address", comment:""),

            (textfield) in
            
        }
        alert.addAction(actionRestart)
        alert.addAction(actionCancel)
        present(alert, animated:true, completion:nil)
    }
}

        
        let actionCancel:UIAlertAction = UIAlertAction(
            title:
            NSLocalizedString("Cancel", comment:""),
            style:
            UIAlertActionStyle.cancel)
        
        let actionRestart:UIAlertAction = UIAlertAction(
            title:
            NSLocalizedString("Restart", comment:""),
            style:
            UIAlertActionStyle.destructive)
        { (action) in
            
            guard
                
                let email:String = alert.textFields?.first?.text
            
            else
            {
                return
            }
            
            FIRAuth.auth()?.sendPasswordResetWithEmail(email) { error in
                if let error = error {
                    print("fucking error \(error.localizedDescription)")
                } else {
                    print("reseted!!!")
                }
            }
        }
        
        alert.addTextField
