Devise + Mongoid store wrong data in session

I'm using Devise 3.2.3 + Mongoid 4.0.0.beta1 and when I try to call `current_user` I get:

~~~
The operation: #<Moped::Protocol::Query
  @length=125
  @request_id=18
  @response_to=0
  @op_code=2004
  @flags=[]
  @full_collection_name="orodruin_development.users"
  @skip=0
  @limit=-1
  @selector={"$query"=>{"_id"=>{"$oid"=>BSON::ObjectId('530a1ec84e49550fbd000000')}}, "$orderby"=>{:_id=>1}}
  @fields=nil>
failed with error 10068: "invalid operator: $oid"

See https://github.com/mongodb/mongo/blob/master/docs/errors.md
for details about this error.
~~~

Bug is somewhere where this is set:

    warden.user.user.key: [[{"$oid"=>BSON::ObjectId('530a1ec84e49550fbd000000')}], "$2a$10$/J1DMorvMdGZm6aQicsYL."]