started some work on JSON based authentication