refactored main.php and webuser