login activity refactor