Beginning of changePassword controller function