You are using a stored UID
which means even if the login is not successful the variable will still hold the information from last login. which could be the reason you are not getting the info.
Can’t say more without seeing the complete blocks for Sign In
and what happens to the UID variable
from the point the app is opened.