Added a before_filter to build initial cookie