Fixed username comparison and added maximum message length