Refactor authenticator to use config