Adding json support for login