title: I am having an issue with my Firebase login, app keeps stoping?
body: <p>I created a signup and login form with firebase when i put data in signup form it successfully submitted and store data in firebase when i try to login with same data it shows app keeps stopping. Can anyone help me find why the app keeps on crashing ?</p>
  
  <p>Here is code:</p>
  
  <pre><code>public class plogin extends AppCompatActivity {
  
  private FirebaseAuth firebaseAuth;
  Button loginbtn,signup;
  EditText email,password;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_plogin);
  
      firebaseAuth = FirebaseAuth.getInstance();
  
      loginbtn= (Button) findViewById(R.id.loginbtn);
      loginbtn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
  
              String mail = email.getText().toString().trim();
              String pass = password.getText().toString().trim();
  
              if (TextUtils.isEmpty(mail)){
  
                  Toast.makeText(getApplicationContext(),"Enter Email",Toast.LENGTH_LONG).show();
                  return;
              }
              if (TextUtils.isEmpty(pass)){
  
                  Toast.makeText(getApplicationContext(),"Enter Password",Toast.LENGTH_LONG).show();
                  return;
              }
  
  
              if (pass.length()&lt;4){
  
                  Toast.makeText(getApplicationContext(),"Password too short",Toast.LENGTH_LONG).show();
  
              }
  
              firebaseAuth.signInWithEmailAndPassword(mail, pass)
                      .addOnCompleteListener(plogin.this, new OnCompleteListener&lt;AuthResult&gt;() {
                          @Override
                          public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                              if (task.isSuccessful()) {
  
                                  Intent it=new Intent(plogin.this, com.example.babycare.parentdashboard.class);
                                  startActivity(it);
  
                              } else {
  
                                  Toast.makeText(getApplicationContext(),"Login Failed",Toast.LENGTH_LONG).show();
  
                              }
  
  
                          }
                      });
  
  
          }
      });
  }
  }
  </code></pre>