import Firebase from 'firebase';
import config from '../config';
import secret from '../secret';

const firebaseRef = new Firebase(`https://${config.get('APP_NAME')}.firebaseio.com`);
firebaseRef.authWithPassword({
    email    : secret.get('EMAIL'),
    password : secret.get('PASSWORD')
}, function(error, authData) {
    if (error) {
        console.log('Login Failed!', error);
    }
});
export default firebaseRef;

@@ -385,16 +385,297 @@
   %7D%0A%7D);%0A
+%0Aconst amOnline = firebaseRef.child('.info').child('connected');%0Aconst userRef = firebaseRef.child('base').child('presence');%0AamOnline.on('value', snapshot =%3E %7B%0A  if (snapshot.val()) %7B%0A    userRef.onDisconnect().set(Firebase.ServerValue.TIMESTAMP);%0A    userRef.set(true);%0A  %7D%0A%7D);%0A%0A
 export d

Add presence toggle