DBC fixes and validate user login

Div fixes from DBC and a fixing wrong variable used in ding_user validate login.

There are also update of coding style.