A LoginModule placed at the end of your JAAS configuration) would allow you to execute extra actions on a successful login. The only drawback is that the way to retrieve the session from a LoginModule is not standard and depends on your application server.
Or you could simply make a test at the beginning of your filter to check if your user is connected and if your setup has already been done.