finish login protocol refactoring