add authentication method for api