converted login.js to funcjs arch