further refactoring of ecdsa
fix and refactor email resend test