cleanup credential handling