Implementation of user logging.