Fix http auth; Improve handling of received messages [MJ-232]