updating handling of credentials