title: Firebase Check if user already exists
body: <p>I tried running the following and it does not work. What am I doing wrong to check the Firebase server if the user has already used the email?</p>
  
  <pre><code>           FIRAuth.auth()!.createUser(withEmail: self.userEmailTextField.text!, password: self.userPasswordTextField.text!) {(createUser, error) in
          if error != nil { 
              FIRAuth.auth()!.signIn(withEmail: self.userEmailTextField.text!, password: self.userPasswordTextField.text!)
  
              //Display logged in
  
              let viewController = self.storyboard!.instantiateViewController(withIdentifier: "TabBarController") as UIViewController
              self.present(viewController, animated: true, completion: nil)
  
          }else {
              //Display an alert message
              self.displayMyAlertMessage(userMessage: "Email already in use. Please see the login page.")
              return
          }
      }
  </code></pre>