added authenticate to api