Access to Firebase Realtime Database only for authenticated users

I succesfull made a signup and login via firebase email authentication. Now I want to let read and write data to realtime database for only that logged in users. How should I write Firebase rules? Like this?
{
"rules": {
".read": "auth.uid !== null",
".write": "auth.uid !== null"
}
}
and should I do anything on app inventor after login?

https://firebase.google.com/docs/rules/basics