updated getUsername to getEmail