Topic: New cookie overwrites session cookie with acts_as_authenticated

Rails 1.2.1, Ruby 1.8.5, mongrel 0.3.18, sql_session_store

I'm experiencing a problem when using the remember_me feature of the acts_as_authenticated plugin. If I login with remember_me, the auth_token cookie is set as expected and everything works fine until I close the browser and return to the site. When returning to the site I get logged in automatically as expected but when my auth_token cookie gets updated my rails session cookie seems to get deleted. This means that all subsequent page requests results in a new session being added to the database and getting logged in again.

Unfortunately, the feature works on my local machine but I experience my problem when I test on my staging server.

# user.remember_me
self.current_user = user
# cookies[:auth_token] = { :value => self.current_user.remember_token , :expires =>self.current_user.remember_token_expires_at }

The lines that have been commented out allow the remember_me feature to work on staging.

Any insight as to why updating a cookie would delete my session cookie?