test updates - need more
at logic for 'LoginEx' function and fix memory leak reported by test
changes variables for clarity and add return for plain xml (if needed and for testing)
test updates