code formatting and minor refactorings
enhanced scan operator
implemented login with own db