Updated foundation. Updated 'add new doc' functionality. Updated login auth.