fix devise compatible bug with mongoid