apply session and update accounts api