This question is related to thisthis one and thisthis one. It also has a partial answer herehere and herehere.
In the third link the account is being unlocked for a period of time using web3.js:
web3.personal.unlockAccount("0x..", "<passs>", 1000);
The unlock period parameter is optional.
How is it possible to check if accounts are locked (prior to making transactions)?
Are there any functionality consequences of unlocking an already unlocked account?