fixed a bug, added pw reset feature