Take a look at the "External Code" page of the docs which explains the basics. You can check if a user is logged in with qa_get_logged_in_userid()
For the avatar you'd need some PHP like:
$user = qa_get_logged_in_user_cache();
echo qa_get_user_avatar_html($user['flags'], $user['email'], $user['handle'], $user['avatarblobid'], $user['avatarwidth'], $user['avatarheight'], qa_opt('avatar_users_size'));