Test password reset and fix bug