initial setup of sessions and authentication