Username, user id, login name, they all mean the same thing to me.
Why do you see it meaning something different?
Which UserDetailsService are you using, JDBC, LDAP, etc?
For JDBC just change the userByUserName property or authoritiesByUserName property to go to the name of the fields in the database that you have that don't match the default built in queries.
Remember the userByUserName property query has to return three fields; username(userID), password, and boolean for enabled.
The authoritiesByUserName query has to return two fields; username(UserID), role
For the role field, make sure it is prefixed with "ROLE_"