use LASTLOGGEDUSER instead of legacy USERID

see-also: #2458