Initial api get working. Need to fill it with content (make work properties, values, wares etc) now  only barcodes and characteristics are added to response. TODO eliminate authentication parody code.
Model's refactoring (normal references fields names). Get barcode api works fine.
Authentication working. Index action in API controller working too.
Refactored Client model. Web authentication working. CanCan+Rolify added. Bootstrap fixed.