add support for /stats iauth and /stats iauthconfig and fix some global var declarations which were not being executed