wait until firebase connects before trying to access data