Added authentication check to the demo.