Pedantic nit: Add `encodeURIComponent(name)`?  Names that aren't === their encodeURIComponent() counterparts are invalid for new accounts, but there are some broken ones that got grandfathered in.