Add Security Token to HTTP Headers
changes in error handling