Merge frontend code into backend code

This make sure we don't have to do
cross-domain ajax requests.


Signed-off-by: Davy Meers <davymeers@hotmail.com>