title: Flutter Firebase Login is not Successful
body: <p>Firebase Authentication: email/Password was already set to Enabled. Realtime Database: users records exist. Email and Password: thoroughly checked and verified correct.
  below are the code for this issue;</p>
  <pre><code>final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
      
        void loginUser(BuildContext context) async {
          final User? firebaseUser = (await _firebaseAuth
                  .signInWithEmailAndPassword(
            email: emailTextEditingController.text,
            password: passwordTextEditingController.text,
          )
                  .catchError((errMsg) {
            displayTostMessage(&quot;Error: &quot; + errMsg.toString(), context);
          }))
              .user;
          if (firebaseUser != null) {
            userRef
                .child(firebaseUser.uid)
                .once()
                .then((value) =&gt; (DataSnapshot snap) {
                      if (snap.value != null) {
                        Navigator.pushNamedAndRemoveUntil(
                            context, HomeScreen.idScreen, (route) =&gt; false);
                        displayTostMessage(&quot;You are logged in&quot;, context);
                      } else {
                        _firebaseAuth.signOut();
                        displayTostMessage(
                            &quot;No info exist. Please creat an account&quot;, context);
                      }
                    });
          } else {
            displayTostMessage(&quot;Erro Accured, Can't be Signed-in&quot;, context);
          }
        }
  </code></pre>