Attribute of session is returning null

Hi, everyone.

Im developing the login part of a relatory portlet, but Im having some problems with the persistence of the value of the attributes in a session.

First of all, my login has two parts: one part is a view where the user puts his login, password and organization his is registered; the other part is another view where the user chooses his profile, the activity and product he wants to manage.

To bring the profiles binded to the user, I need to get the username and the organization he is registered from the first view. Im using VaadinSession and setting the attributes "username" and "org" at the first view, so when Im at the second view, I can get those values and filter the profiles names that come from a database. But, when I use the getAttribute, It returns null.

I know that, maybe, the session is been closed when I`m directed to the next view, and I want to know how I can maintain the session.