added task scheduler for api authentication