Windows IP renew, auto logout, randomize relogin time

Add IP renew when login/logout.
Add randomize relogin time.
Add logout when application closes.