refactor login again