added login distinction functionality