You could use NMB_OF_SESSIONS - something like this :
If NMB_OF_SESSIONS(LoggedInSystemUser)>1 Then
DISPLAY QUESTION 'There is already a logged in user with this name. Do you want to cancel this session and proceed with the login?'
If Question.Reply='Yes' Then
LOGOUT LoggedInSystemUser
ELSE
REPORT ERROR 'Login aborted'