extract get-user-id command and add tests