Added logging in and out