Using arrays in a potentially massively distributed system such as Firebase are in general a bad idea. And from what you've described, your use-case falls under the "in general" category.
From the Firebase documentation on arrays:
Why not just provide full array support? Since array indices are not permanent, unique IDs, concurrent real-time editing will always be problematic.
Consider, for example, if three users simultaneously updated an array on a remote service. If user A attempts to change the value at key 2, user B attempts to move it, and user C attempts to change it, the results could be disastrous. For example, among many other ways this could fail, here's one:
// starting data
['a', 'b', 'c', 'd', 'e']
// record at key 2 moved to position 5 by user A
// record at key 2 is removed by user B
// record at key 2 is updated by user C to foo
// what ideally should have happened
['a', 'b', 'd', 'e']
// what actually happened
['a', 'c', 'foo', 'b']
Instead of using arrays, Firebase uses a concept called "push ids". These are consistently increasing (like array indices), but (unlike array indices) you don't have to know the current count to add a new push id.
With push ids, you can add a new user with:
var ref = new Firebase('https://yours.firebaseio.com/rooms/users');
ref.push('[email protected]');
Note that the Firebase documentation is in general considered to be pretty good. I highly recommend that you follow at least the programming guide for JavaScript, from which I copied the above.