making sure users are logged in before they can make changes