fixed recursive refreshing when logging in/out failed