[PD-781] Added requirements to password change form.

This also fixes the fact that middleware breaks mymessages under certain conditions.