Changed logic for user trying to access another user's profile page.