Fix error that user session is not saved after updated