Update adquery.py

Code changes in order for the methodology with specified credentials to work without exceptions . It will also resolve known bug.