working login with avatar