How to get the logs of time or ip about user login or logout?
You need an app for NC https://apps.nextcloud.com/apps/files_trackdownloads
Or check your webserver (e.g. Apache2) logs.
The App can not get the logs about login or logout, but can get the logs when the file changed.
You right, try to enable
Auditing / Logging App… It should write such kind of data into log file.