refine todo view and login logic