Created api function checkinUser