Improve credentials passing