Verbose logging and correct HTTP codes in replies

Proxy replies with 404 code if there is no requested application in the cloud. Also it replies with 502 code if can't access cloud. A lot of verbose logging messages has been added.