oh yeah, I've been there before.
Once, I was thinking "why do I store an ecrypted user password along with the cookies, why not just use the user id".
Then my brother reminded me that if the user forgets their password, they would just have to forge a cookie with only their user id, which would lead to stealing other peoples accounts. WOW. can't believe I almost went to that.
Just a slip of the mind.