updated UserRepository to include groups from users