updated http authentication handling