Storing userid and api_key in a cookie, added jquery.cookie