fix some bugs and add change password function