User authentication made in JS