title: Able to Authenticate user in Firebase authentication but could not able to store data in Firebase database
body: <p>I am able to authenticate user by Firebase authentication but could not able to store data in Firebase database. I am not getting any error in logcat. I haven't changed any rules in Firebase database. My rules are set default. Here is my code:</p>
  
  <pre><code>fun authenticateUser(){
      Observable.create(ObservableOnSubscribe&lt;Task&lt;AuthResult&gt;&gt;{
          e: ObservableEmitter&lt;Task&lt;AuthResult&gt;&gt; -&gt; run {
          try {
              firebaseAuth.createUserWithEmailAndPassword(email!!, password!!)
                      .addOnCompleteListener(this, object : OnCompleteListener&lt;AuthResult&gt; {
                          override fun onComplete(p0: Task&lt;AuthResult&gt;) {
                              e.onNext(p0)
                              e.onComplete()
                          }
                      })
          }
          catch (ex : Exception){
              dialogs?.dismiss()
              displayMessage("network problem..")
              e.onError(ex)
          }
      }
      }).subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe(object : Observer&lt;Task&lt;AuthResult&gt;&gt;{
                  override fun onError(e: Throwable) {
                      e.printStackTrace()
                  }
  
                  override fun onNext(t: Task&lt;AuthResult&gt;) {
                      if (t.isSuccessful) {
                          storeData()
                      }
                      else if (!t.isSuccessful){
                          dialogs?.dismiss()
                          displayMessage("some issues has came..")
                      }
                  }
                  override fun onComplete() {
                  }
  
                  override fun onSubscribe(d: Disposable) {
                      compositeDisposable?.add(d)
                  }
              })
  }
  
  override fun storeData() {
      var currentUser = firebaseAuth.currentUser
      val databaseReference = firebaseDatabase.reference.child("Users_Information").child(currentUser?.uid)
      val data = HashMap&lt;String,String&gt;()
      data.put("name",nameString!!)
      data.put("email_address",emailString!!)
      data.put("image","def")
      data.put("thumb_image","def")
  
      databaseReference.setValue(data).addOnCompleteListener {
          task -&gt; if (task.isSuccessful){
                  dialogs?.dismiss()
                  displayMessage("user is created")
                  goToNextActivity()
          }
          else if (!task.isSuccessful){
          dialogs?.dismiss()
          displayMessage("Authentication failed, try again later")
       }
          else if (task.isComplete){
          displayMessage("data not stored")
       }
      }
  }
  
  override fun goToNextActivity() {
      var intents = Intent(this,MainActivity::class.java)
      intents.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
       intents.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
      startActivity(intents)
      finish()
  }
  </code></pre>
  
  <p>Uid is generating but data is not storing in Firebase database.I debug the code but didn't find any issue. Where is the problem, please help...</p>