Publishing messages in the sample app and connecting with username and password

1. Updated the sample app to publish messages to a topic
2. Added options for username and password in the sample app
3. Added support for username and password authentication on connect in the mqtt client