Added authentication based on config