renamed JSON field (avatar -> image)
shrinked down login code