can validate credentials from js