How to properly prepare of a session