Well, first I suggest you look into SDL, because it doesn't suck like glut. Next I want to say that I think the glLoadIdentity is supposed to be before the glOrtho, I could be wrong however, I am not a OpenGL guru. I also think you need to create your window before
setting up OpenGL viewport stuff.
SDL Rocks, does the same + a lot more than glut, and it doesn't suck!
Glut is lame, can't do all that SDL can do, really sucks, and bites also!
<- this is where you start fixing your problems