I\'m trying to add new document in firebase after a successful login but the add data part keeps on failing. It seems that the firebase.auth.then() fires ev