ensuring authorization is set still after page refresh