react authentication using json server api