Fix potential NPE

Rotated my phone before logging in and noticed the `uiController` throws a NPE.