more work on analytics, added analytics page to admin pages, fixed some bugs in other pages