Implemented handling of HTTP status codes 401/403