Code reformatting, login protocol work