refactor session controller
fix conflicts with other iframe