fix for invalid credentials
use better means of resolving avatar, refs #675