Added autoscroll, updated backend.

If data appears to be cut off, it gets stored in a variable. When new
data comes in, it then gets attached to the cut off data making it
appear as a complete set of data.
Each new line is treated as a seperate string.
If the client is already scrolled to the bottom, when new data comes in
the client will be scrolled to the bottom.