This can be achieved 2 ways.
1-Activate system alarms and log these, among all other system alarms you will find logins, failed logins, and logouts. User name and user grp will be displayed.
2-Scheduler > Event = User change.
Function 1 = TraceUserChange
Function 2 = GetUserName (tagOut is a string) This will output the username to a tag which you can log.
Function 3 = GetGroupNumber (TagOut is a int) This will output a number correspondant to the group the user is in. This is optional, but can be used to see if a user is locked.
Hope this helps.