Improve password generation

Use md_rand() instead of uniqueid() as it will be slightly more secure.