Solving problem with login/logout on pause and resume