added code to prevent non-logged-in users from seeing buddypress pages. tweaked template files.
merged changes