Refactored server side variables.
Added UNIQUE (UserId, ActivityId) constraint to UserActivityRelationTable.