Added null checks for BrokerLogin call.
Added null check.