OS X glitch

I am running OS X 10.2.8 ( I know, I should install Panther!).
In the last 6 months, I had the same glitch 3 times. It happened again tonight.
I was logged in, but left the computer inactive. The screen saver mode comes on after awhile. As usual, I pressed the space bar of move the mouse to get back on the computer. But instead of the finder, I was in single user mode -black screen, white font, Darwin. Now, I logged in, and then try to log out but it came back to the black screen. I have tried “exit” and the same thing happened. I ended up restarting the computer.
Anyone else have this happen? And what command should I use to get back to the login window?

I think you should switch to Windows, Its has less problems, and when u do have a problem you can get support in say 4 to 5 months. lol…Kidding.