Add missing apikey function and finish merging code
Get username, password, apikey functions and tests