Fixing high DPI bug (auth window height exceeding screen height)

Moved the null check up.