Modified application to make a REST call to login, stores AUTH header if successful.