added login function and created json file