title: How create new user with Firebase API w/o signing out?
body: <p>user signs in. I make a call to create new user with </p>
  
  <pre><code>firebase.auth().createUserWithEmailAndPassword(email, password)
  </code></pre>
  
  <p>it successfully creates new firebase user. Before this call <code>firebase.auth().currentUser.uid</code> gives different uid then after the call. So active user changes. </p>
  
  <p>Is there any way for active user create another user and still be active user?</p>
  
  <p><strong>I know one way to work this around</strong>:</p>
  
  <p>Save user's email &amp; password to memory and after creating user re-login back to original user, but it requires saving password and i don't like it.</p>
  
  <pre><code>firebase.auth().createUserWithEmailAndPassword(email, password)
        .then(user =&gt; {
          // login back to main account
          firebase.auth().signInWithEmailAndPassword(current_user_email, current_user_password).then(original_user =&gt; {
  
            const userRef = firebase.database().ref().child(`users/${user.uid}`);
            userRef.set({
              ...
  </code></pre>