Fix logging for all commands, Add invalid username check