add logout and getphoto