first pass add real login during startup plus some code cleaning