replace login functions to Main Win