better handling of optional plug-in dependency
added credentialId parameter to loginCheck