User control logger

It uses the username parameter to the key of $_SESSION from which get the username.