change user session logic