changes for supporting basic http auth.