add log handler to enviroment holder

and handle the username password