added restrictions in templates for viewing other user pages