refactor frontend init & made github auth work