In your system you have rudimentary control of the mouse and keyboard for use in setting up the BIOS set points. Then when the operating system loads, it changes over to the keyboard and mouse drivers found in the operating system.
If you are loosing them at the sign in page, then those drivers are corrupted. You will need to do a fresh install of the operating system to correct that. Alternatively, a start up repair work too.
You will need either an installation disc or better an USB flash drive with the operating system boot media.
For example, Windows 10 64 bit ISO downloaded to a USB flash drive. Then just insert the drive into a USB port on the back of the PC and start it up.