Fixes to allow id's to be used as primary rather than usernames
This allows models to be linked to users id's instead of names.