Fixed bugs on changing passwords