generates session controller