encrypt the password of user and implement of register