Fixes a problem where basic auth was disabled and a nill pointer was hit, causing a panic. Signed-off-by: Alex Ellis <alexellis2@gmail.com>