Log in when session invalid error encountered and try again.