Use context and context logger in handlers.
Refactored user device key generation into seperate module.