Sending variable from php to js file not working
You shouldn't set the values in the submit hook, you should use hook_init().

In the submit hook you should set a variable ( variable_set("name", "value") ) and read it in the hook_init using variable_get("name", "dafault_value");

On the other hand, you should NEVER add the password in js variables. It's a huge security risk.