javascript API
login page converted to new API