Added security check to prevent one logged in user from editing another user's events