It would be nice if someone knows a better way, but you can track login and logout through the i5/OS History Log (QHST). It's been a couple of decades since i wrote queries against the log, but it is just a DB2 file,
The message looks like
Message ID . . . . . . : CPF1124
Date sent . . . . . . : 12/31/09 Time sent . . . . . . : 08:50:46
Message . . . . : Job 763999/LOGINID/QPADEV002V started on 12/31/09 at
08:50:46 in subsystem QINTER in QSYS. Job entered system on 12/31/09 at
08:50:46.
X
So you can pull records by the message number CPF1124. You'll have to figure put the details.