move username/password prompt into the api, add python3 support