Move session init to top