replaced http auth with proper login
ruby 1.8 compatible
another ruby 1.8 fix