added switch to enable / disable authentication