Better logic for join table between users and artifacts