By default, you need to know the password generated by TeamViewer on the remote computer to connect to it. But, the problem is that TeamViewer generates a different password everytime it is re-started. Instead, it would be convenient to just login into the remote computer using the Windows login credentials on that computer.
To be able to login using the Windows credentials of the remote computer, you first need to enable this on the remote computer.
Open TeamViewer on the remote computer and choose Extras → Options. In Security → Rules for connecting to this computer → Windows logon, choose one of either Allowed for all users or Allowed for administrators only.
Back on your own computer, when you connect to the remote computer TeamViewer presents you with a TeamViewer authentication dialog. Choose Advanced here and for Authentication dropdown choose Windows. You should be able to login now into the remote computer using your Windows login credentials on that computer.
Tried with: TeamViewer 7.0.12313