increased login limit for cachemaster role from 1 to 2
eliminated ambiguity in local variables. added second loop to insert additional provisioning events for existing devices