authentication smoother on page reloads