Hello @kvvaradha.
I have choosen another approach. In login.php all the initial stuff are processed here. Then the theme login.inc file is called if such a file exists, mostly for the design part, and the final stuff is again processed in login.php. This approach will eleminate the risk of forgetting stuff in the theme login.
If no login.inc file exists a default login is used.
The problem is the catch 22 part. We don't know the user theme before the login is effective. But we will find a solution to this. Ii am working on that.
Then reset of the password file is almost a copy of the login.php file. It could be processed the same way. I will see if we can merge the reset password file and the login.php file.
Joe