before generatepasswordresettoken error