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
Have you tried adding lines below to your web.xml?
web.xml
com.sun.faces.enableRestoreView11Compatibility true
I found this to be very effective when I encountered this issue.