Hi Fabio,
The logout button is removed whenever you use the ~canvas segment in the URL and use the window=embedded or window=app options. If you use window=main you will get the logout button back but also the header and the menu etc... that perhaps you do not want in an embedded iFrame scenario like you are describing.
This is standard behaviour. To change it you would need to make an enhancement to the standard code.
Hth,
Simon