I am surprised nobody was able to answer my problem. But finally I solved.
Anyone having the above problem should clear the cache. Not the browser cache though. Go to the server directories and locate directory named core. Then in there you will see the cache directory. The cache directory contains many other sub directories. Delete that directory and all its contents. And amazingly, you can login back into admin section as normal.
You are advised to back up the directory just in case but you should be fine deleting it. For your information, once you login couples of times, a new cache directory will be created.