Fingerprint sensor causes lost of connection Arduino->PC

I recently bought this fingerprint sensor but I'm having trouble.
I'm following this tutorial: so I downloaded the library and I'm trying to use the example like said in the tutorial.
The problem is that the Arduino loses connection with the PC when I try to run the code.
What do I have to do?

Also the sensor heats a bit

Sounds like you connected it wrong, causing over current & your USB port to disconnect to prevent it from damage.

I connected it like the tutorial tells to do, and the sensor works for 1-2 minutes before getting disconnected from the pc