Firebase authentication for database write permission

You might have a good read here:

and here

For Security Rules see here:

https://firebase.google.com/docs/database/security