add auto change function in login frame.