How to stay logged in when apps are closed?

I have push notifications and other type of notifications on my app that shares same database on phone and PC, and it didn’t happen to me. It kept my user logged in but the issue was slow in responding it to a screen that has list of notification user has, so I had to remove it because adalo performance issue!