minors improvement and function log in started to be finished
new commit