Wrap username and password in encodeURIComponent to be URL safe.

I wouldn't recommend that anyway. Lastpass does that and it hasn't worked right in the last several versions of Chrome. It'd be a maintenance nightmare.