Add authentication check.