I wonder if this should be username.lower().encode('utf-8') instead... asking azul.