fix(avatars): clean up numerous issues from comments in #1405

This fixes #1462 and various issues raised by @pdehaan @shane-tomlinson and @ckarlof.

@shane-tomlinson r?
I'm starting to feel that auth-errors.js is misnamed. ;)