Directly send basic authentication

Let's send the basic authentication header directly since some browsers
does not support building it with XMLHttpRequest