Change param name for json_get_avatar_url() to $id_or_email 

Also use $user ID in new user controller when calling this function. Resolves #585 

Replaces PR #599