added feature for ensuring user is signed in