Refactored the login example to use XML instead of JSON