Add an option to specify whether username is required. Follow up to issue #10.