Replacing $resource with $firebase