add login.js and doc