Modification in main.pm

Modification for main.pm and login without install script. 
Need to set ENV REGRESSION and/or KEEPHDDS to enable the function.