Create App that login to Firebase and write to realtime with auth rules

Hi All

Ive seen a few videos on youtube that shows to make a app that registers to your firebase and also to login and open another screen.
But after that login i want to write to realtime database with these rules:
{
“rules”: {
“.read”: “auth != null”,
“.write”: “auth != null”
}
}

Is there any blocks from the auth that i need to use at the second screen to keep me logged in to write to the database with these rules. is there any examples out there?