Added authentication requirement to the API when requireAuth