Changed the way Basic auth is being handled. Now it only uses this method for getting the apikey and then the Authorizatoin header is not being used anymore.