Fixed writing to clients

changed the way usernames are defined