Convert login to POST and ensure result is correct JSON