Now using before hookto save sessions