A login console was displayed and on entering the log in id which is root ( the same was being used with the GUI as well ), the environment refused to accept it.
you mean you login as root all the time?
Rerun the X configuration program (I don't know what it is for redhat, but it will be explained in your book I guess...)
Make sure you don't type any mistakes (capital letters etc..) when you login, if you didn't type any mistake.. maybe you deleted or replaced the /etc/passwd file? I don't know but if you can't login anymore there's not much left to do for you but ... a fresh install.