Send credentials only when they are provided

Closes-bug: #1272130

Change-Id: I9a82e52dcadcdcf02ecbadaf23c42243d59b464a