fixed MainActivity so it won't crash if there's no username