Create Account with Names (using Firebase)

Hello,
I want to make it where you can create an account and type in your name, and then display it on another screen.
When I try doing this on Account A, it successfully works and saves the name in firebase. When I create another account (Account B), it also works and displays the name. But when I login to Account A, it shows the name of Account B. It also seems like it replaced the old name in the database and wasn’t tied to that created account. How would I solve this?

Firebase has a data console where you can see all its entries.

Show us a screen shot of it.


Where is Account B if John Doe is Account A ?

Both accounts were created with different names. It seems that the inputs are shared across all accounts. Account B replaces the email and name information stored in the database, but when you log in everything works fine except that the name of Account A has been replaced with the name of Account B.

And maybe it has something to do with logging out? Everytime I log out it logs me out but gives me an error which says "Firebase error this client does not have permission to perform this operation".