Fixed device order return in model for search, get_by_user. Added 'sequence' to add func. Also fixed devices.js to send sequence.