Persistent credentials, JS side. Closes #12