Updated masterserver

Fixed huge security holes
TODO
-Switch heartbeat checking into tasks