Implement login protocol