Retrieving user's previously saved schedule after they log in or show an empty schedule if they are signing up using tinydb and firebrealtime database

Hello guys i want to develop a pill dispensing app where multiple users can log in/sign up. If they sign up they will be redirected to another page where they get to store their pill names, pill times, and pill count (only 3 pills). When they press the save button all this info will be stored in the Realtime database so that later on when they log in it is displayed for them. I can’t use firebase authentication as i keep getting errors so i tried to do it manually by setting the unique identifier to the username and on the pill info page its supposed to compare the username with the saved username in the database and display the saved pill info, but it’s not working correctly. When i sign up I still get the recently saved pill info of another account. how do i retrieve the specific user’s info from the database based on their username??