partial js for sign-in feature