Move script to passkey.js