Fix login state issues and hard refresh routing issues, check login session periodically