Added authentication check for each api route