I have written simple application with container-managed security. The problem is when I log in and open another page on which I logout, then I come back to first page and I
I ran into this problem myself and realized that it was because of a side-effect of a Filter that I created which was filtering all requests on the appliation. As soon as I modified the filter to pick only certain requests, this problem did not occur. It maybe good to check for such filters in your application and see how they behave.