fixed loop upon login