logging in gateway