Hi Xavier,
In order to get this sort of thing to work, you'll have to probably pass back more than just a list of usernames. I'm not sure how much flexibility the autocomplete control has in this regard, but you would want to send back a small json structure for each result.
e.g.
[{"user" : "Jon" , "id" : 23}, {"user": "Xavier" , "id" :24}, ...]
once you have it in this format coming from the server, you could then parse it on the client so that the username is all that shows up and you could store the id either in the DOM or in a variable on the page.
Hope that helps,
-
Jon