Checkin and checkout in same js