Add credential fetching.
Reverting change from develop branch.