Reorganise settings
Update API proxy
Purge runserver
Add flask login dep
Rearrange routing