added http auth support