added middlware to make username cookies cross domain