Two way json

Change login to read json, still problems with sending json being empty.