if the argument is a model. This ensures that the proper gorm hooks are
called which was causing the full screen view on the Places page to
crash.
Also fixed a bug in Messages.js that caused a crash.
This replaces the current implementation
where a bearer header holds the auth-token.
Now the same token is being sent using a cookie instead.
This greatly simplifies fetching resources (images and video),
since the header is sent along implicitly with each request.