getting cookies to work