Fixing xml auth and some tweaks