added key generation to user_create