Move password reset logic to model and clean up view