How does a guest get in at 3am if nobody's at the desk?
The same way they'd get in at 3pm: their 4-digit code activates at check-in time and works identically at any hour. Gate, entrance and dorm all open on that one code — there's no separate night procedure to run.