Fix login bug and firebase service injection bug