setCred() functionality