Upon further testing, I’m still having the logout issue, but only with a specific portal… strange isn’t it? I’ve made all kind of changes to the code, but no results. What’s is clear for me now, is that there’s a problem with the cookies, it has the required info at first login, but as soon as I start navigate the site, it loose some of the info, and suddenly the cookie has expired (or loose all the info for authentication). Why is this happening?? No idea yet, but as long as I know, there are two places where the cookies are handled/configured: web.config and DotNetNuke.HttpModules.DNNMembership.dll, so I'll read more on the subject and post any finding.
By the way, the dll in version 4.0.3 is the same as in 4.0.2.
Rgds