Changed serverstub.js functions to use xmlhttp requests.

Signed-off-by: anickelbagoffunk <christoferpalmgren@gmail.com>