Minor cleanup of non-blocking authentication code. #4137

Fix some Coverity complaints and remove some unnecessary variables.