Changed root url depending on whether the user is logged in or not