Add syncing status global and beforeunload confirmation
Add auth decorator for API methods
Load image viewer client-side