Search login bug fix

Fixed a bug that tried to access username/UID when the user was not
logged in.