BZ-10447: guard against null profile when not logged in.