Add support for Basic Auth and profile.
Fixed error extraction.