How to store user data in session using Wicket?
===

*I am learning Wicket using "Wicket in Action" book.*

## What I did (safe to skip)

I would like to create such workflow:

* user opens the page for the first time -- "user not logged in" is printed out
* user goes to log-in page
* user logs in (successfully)
* user is redirected to main page -- and info about user is printed out

It is all described in the book, and in theory it looks OK. There is a class for user data (`UserData`), and there is class session (`MySession`) which holds user data. Session is created in Wicket `MyWebApplication`, on call of `newSession` method.

But the result is -- it does not work. 

## The problem

User data are deleted just after successful logging in. The problem is creating session:

* entering the page, plus
* going to log-in page, plus
* getting back to main page

results in 6 created sessions. Of course each new session kills previous one, and with it all data. 

**Question:** so how to store user data in session properly, or rather how to make a session work like a real session?