Fix bug in Rails 4 when session reset brought to NoMethodError

fix for #464
can be removed when Rails 4.1 is out