authentication api set up