code cleaup.

some code cleanup.
validate registered visitor
add visitor log
change date format