fix append params
remove basic auth and fix b64 encode
fix missing import
refactor var name