Fixed some mistakes
Encrypt password when is changed