   Removed obsolete CORS header code, cleaned up the responses when there are error conditions.
   Removed obsolete CORS header code, cleaned up the responses when there are error conditions.

kbase/auth_service,kbase/auth_service,kbase/auth_service,kbase/auth_service