[FIXED JENKINS-25144] Http BasicAuth broken in combination with a web Session

return authentication object instead of null if authentication is not required - otherwise valid login fails with basic authentication
To add a proper unit Test for this code I would have to change code in the BasicHeaderRealPasswordAuthenticator to make it testable. However I would prefer to leave this to the original author of the code - since he has more knowledge of the internals...?

The BasicHeaderProcessorTest does fail without the fix though (if that helps?)