Get sessions working correctly