Changed id to user_id in token checking