add Promise library to resolve callbacks hell
apply promises to do login and then search