Refactor activation and password reset