Did you open multiple applications, or the same application multiple times, in the same browser? You should have only one application running on localhost open at the same time in the same browser. Otherwise the apps will 'steal' each other session information, causing the logout.