Smartcloud form changes for JS

Changes for smartcloud form based authentication in JS