Added authentication middleware to the scheduler server