Fixed a bug that would stop a layer from syncing if one of its features hadn't been saved.  I fixed this once before, many moons ago, but I guess the fix was removed somewhere along the line.
Fix for script error when a feature is created and user cancels out of the attributes menu without saving. Essentially, remove the feature all together which is more intuitive as well.
Revert "Fixed a bug that would stop a layer from syncing if one of its features hadn't been saved.  I fixed this once before, many moons ago, but I guess the fix was removed somewhere along the line."

This reverts commit 8a941b369e4de8fe917bd75df21872a523a4b4eb.
Added checks to make sure the media is an array.
Changed the authentication to attempt a basic auth login through geoserver's rest api.
Fixed server authentication for arbiter.