Added getCredentials function