Tic tac toe with AngularJS and Firebase