added error message on unauthorized REST requests