Modularize new user key generation code in a new function