Revert "only authenticate for API requests and not documentation requests"

This reverts commit e3bb28e26e3326d7e1fc8b60f9a5eb6a63769043.