Found the answer in the Wiki in the Action Assignment section
1. Find the user id
Select UserID from Users where Username='someusername'
2. Assign the UseriD to the UserInfo object
Assignment <UserInfo>. to [UserID,USER]
3. Assign AUTHENTICATE to the UserInfo object
Assignment <UserInfo>. to AUTHENTICATE, LoginResult
The action variable LoginResult will now contain the result.
Works like a dream.
This opens up SSO using many options including Social Apps and even automatic login via urls with self generated tokens
Gotta love OWS