Added user checks and basic JSON functionality