Added query authentication and gframe tweaks