added authentication support to pull op

Sometimes the pull operation needs authentication support, so I added it based on the example of the push op.