Sending "authorization":"undefined" causes basic authentication modules to return a 400 instead of 401.

Sending "authorization":"undefined" causes basic authentication modules to return a 400 instead of 401.

So, I added some undefined checks that verify that the headers are defined before stuffing them in the request.