Update HTTP password when needed and remove redundant casting
Merge pull request #743 from srazi/master

Update HTTP authorization when needed+remove redundant casting