added encryption to the registration