using cookie to store name in controller