Changed the bootstrapping order. Passed the session data to the main template.