Added functions to update playerId, groupId and userRole