Working windows version

alpha. Login logouts with partially working keepalive.