code and key management for users