While checking the source code, i found that it would benefit from some refactoring. There are e. g. some methods which get the user name as a parameter, while most of them simply fetch it from the global options struct. However, those methods receiving it as a parameter get this from the global options struct in the end. I suggest removing the user name parameter from the signature of all those methods.
Furthermore, i suggest using the unescaped user name for logging purposes even where the escaped user name is used.