if the user is not logged in is redirected to the 'index'