First of all, implement the filter which looks for the active session whenever some one tries to access the user pages, in that case even if browser goes to last page after logout using back button, the user can't do anything as he/she will be redirected to login page.
As I understand now your issue is when user logout in login page user name text feild display user name. if it problem you have to reset user name text feild when you redirect page.
if log out works fine. then you don't want reset login form feilds
Software Engineer(BSC):SCJP 1.5
(Knowledge is power when applied)
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
ScroogeXHTML 8.0 - RTF to HTML5 and XHTML converter