Login session ensuring middleware for Connect and Express.