Add authentication and new def to @task in task controller