added feature for ensuring a user is signes in