fixed error on API endpoints for non-users