use flasks sessions instead of custom cookie. first templates