title: Input Value doesn't save, when pushing onto array gives undefined value
body: <p>I am trying to update the user account details in firebase but I have noticed that the input value for one of my fields keeps coming up as undefined even when I console.log it. I am working in two files one is a loginjs file in which I am defining the user input.</p>
  
  <pre><code>signUpForm.addEventListener('click', function (e) {
  e.preventDefault();
  
  isSigningUp = true;
  
  var email = signUpEmailInput.value;
  var password = signUpPasswordInput.value;
  var displayNameUser = displayNameInput.value;
  var userPrivateKey = signUpPrivateKey.value;
  
  var user = firebase.auth().currentUser;
  var photoURL = "https://www.gravatar.com/avatar/" + md5(email);
  
  if (signUpPasswordInput.value !== signUpPasswordConfirmInput.value) {
      setSignUpError('Passwords do not match!');
  
  } else if (!displayNameUser) {
      setSignUpError("Display Name is required!");
  
  } else if (!userPrivateKey) {
      setSignUpError('You need to set a Private Key!');
  } else {
      auth.createUserWithEmailAndPassword(email, password)
          .then(function (user) {
              user.updateProfile({
                  displayName: displayNameUser,
                  photoURL: photoURL,
                  privateKey: userPrivateKey
  
              }).then(function () {
                  // Update successful.
                  window.location.href = 'chat.html';
              }).catch(function (error) {
                  // An error happened.
                  window.alert("Some unexpected error happened!");
              });
  
              user.sendEmailVerification().then(function () {
                  // Email sent.
              }).catch(function (error) {
                  // An error happened.
                  window.alert("Email was not able to send!");
              });
          })
          .catch(function (error) {
              // Display error messages
              setSignUpError(error.message);
          });
  }});
  </code></pre>
  
  <p>The weird thing is that the user input for my displayname and photoURL are working just fine, but when it comes to my private key user input it registers the input when it goes to the chat page and I do a console.log(user.privatekey) It says it is undefined.</p>
  
  <p>In my chatjs file, thats when I am pushing the all the user profile information. The chatjs file basically allows a user to send a message, the message and all the user profile information gets stored onto the firebase database.</p>
  
  <pre><code>            messages.push({
              displayName: displayName,
              userId: userId,
              pic: userPic,
              text: myString.toString(),
              privatekey: user.privatekey,
              timestamp: new Date().getTime() // unix timestamp in milliseconds
  
          })
          .then(function () {
              messageStuff.value = "";
  
          })
          .catch(function (error) {
              windows.alert("Your message was not sent!");
              messageStuff;
          });
  </code></pre>
  
  <p>The thing again is that the privatekey does not get stored at all, which is what I am not understanding, since it is registering user input in the loginjs file but when I go to the chatjs file it keeps saying the value is undefiend. I have googled everywhere and I still haven't found a solution to it. Any help would be greatly appricated!</p>