Added email to name mapping and fixed client exit