Generate public api key for users when they register.