Add config option to enable/disable authentication.
Use config.getint instead of casting to an int.