attempting to add checking for private and public authentication on the api side