Fixed bug in account.py that throws errors in newer python builds

Use dict.keys() instead of if dict['key']
LDAP authentication proof of concept.