Revised test application with new auth code.
Test application now exits gracefully when connection cannot be made.