Added authentication check.