Updated to use avatar template code directly.
fix bug
Remove temporary monkey patch, PR was accepted.
handle incorrect auth_tokens