generated random codes from uppercase letters and numbers with password protection