Fix issue 430: use device.public_key everywhere, instead of mixing with getting the public_key from Settings
Merge pull request #756 from bcipolli/issue430

Fix issue 430: use device.public_key everywhere, instead of mixing with getting the public_key from Settings