remove optional_auth and better use params