add authorization to the tasks
fix the bug