final version -login bug fixed