Sounds like a keyboard problem.
Try connecting an external keyboard before you turn it on and see if it will let you use that to log in. If that works. Then you need to see about resolving what is causing the keyboard (attached one) to type without being typed on by you.