null terminate http auth string correctly