Added functionality to assign users to devices