adding password rest method and changing some logic around