Fix bug in basic auth