Add basic auth support to api