finish modifying json login from tutorial to fit our project