make device_users return only distinct usernames

also possibly improve performance insignificantly