Registration Function: 1) add password checking; 2) add SHA256 encryption to password.