Newbee with multiply issues, MQTT, SSL log on etc etc

Hoping to be pointed in the right direction or told why I’m an idiot.

Problem 1 I won’t mention the rest yet

I’m using the embedded broker in pi AIO and tested without authentication and it works fine using
mosquitto.conf and the command mosquitto_sub -d -t "dev/test"

Client mosqsub|3495-HomeAssist received CONNACK
Client mosqsub|3495-HomeAssist sending SUBSCRIBE (Mid: 1, Topic: dev/test, QoS: 0)
Client mosqsub|3495-HomeAssist received SUBACK
Subscribed (mid: 1): 0

All good, this was the mosquitto config

pid_file /var/run/mosquitto.pid
log_dest file /var/log/mosquitto/mosquitto.log
user mosquitto

I then set up with authentication, created a user and password (and restarted the PI) and things went very wrong using command mosquitto_sub -d -u username -P password -t "dev/test"

Client mosqsub|3638-HomeAssist sending CONNECT
Client mosqsub|3638-HomeAssist received CONNACK
Connection Refused: not authorised

This is latest new mosquitto config

pid_file /var/run/mosquitto.pid
log_dest file /var/log/mosquitto/mosquitto.log 
user mosquitto
allow_anonymous false
password_file /etc/mosquitto/pwfile
listener 1883

Double checked the username and and re added the password have run several mqtt config options and no luck

I have tried everything I can think of and google with no luck