Fix NPE when authentication is needed
Merge remote-tracking branch 'origin/master' into fix-NPE-clientservice
Merge pull request #1634 from CarlosManias/fix-NPE-clientservice

Fix NPE when authentication is needed