A hashed session cookie is good for keeping a user logged in. That's because the cookie stays on the user's computer, and allows it to access session data. Hashing it adds a layer of security.
A user's IP address isn't so good as either a cookie or a session variable. For one thing, it can change (as in a smartphone moving from one tower's range to another). For another, it can be shared (as in multiple users riding on the same wireless router). Finally, IP addresses can be spoofed.
Sessions, on the other hand, will only last as long as the browser is open (subject to session timeouts set on the server side). In this case, the session establishes one session cookie that allows the browser to point to session data on the server.
Session data is much more secure, since that one session cookie is all that's resident on the user's machine for the duration of the browser session. That way you can store more sensitive data (user name, personally identifiable info, or account data) on the server.
The only way to access session data is through that user's one single session cookie, which is normally a very long string of random characters. Hashing it makes it very difficult to unscramble.