Updated code to test firebase for realtime interaction