Added optional password length parameter to secure_password

Allow an optional length parameter to be added to secure_password.
If parameter is not provided length is set to 20 characters, exactly how it worked before.