Desktop browsers will logout after 1 hour of inactivity or when closed (attention not just closing the tab). Mobile browsers will also logout when minimized/sleeping for longer time. It's possible to increase the session timeout to a value greater than the ContaCam default of 1 hour (3600 seconds). For example to have the session survive one year (31536000 seconds) add the following line to httpd_conf_editable.txt found by clicking on Settings - Global Settings - Open location of httpd_conf_editable and httpd_log:

php_value session.gc_maxlifetime 31536000

To stay logged in also after closing the browser add this second line:

php_value session.cookie_lifetime 31536000

Restart ContaCam to have the changes applied.