fix a bug in terms of login: even login but do not show avatar and show the error avatar is not difined.
formate the view file