Add PIN generation and deviceId groundwork