added logging messages, made some server calls asynch