adding apikey authentication, migrating some views to using the api