Adding apikey functionality