Added unique restriction for models
Improved api.py implements to make it working correctly
Added basic authentication flow