The Ternio app may go into the background and can log out if iPhone settings are not set for Background App Refresh. Here's how to fix that:
Tap the Settings
Scroll down until you get to TernioCX or TernioF9.
Make sure that Background App Refresh is turned on.