Started to refactor user.php