updates to random tag / key generator, and fix possible issue with incorrect generation of split login dialog encryption key