Merging the user-password authentication part from feature/daemonauth