Fixed sessionid being NoneType bug caused by sessionid being prepended with whitespace that wasnt stripped from the cookie
Message passing now uses JSON