add login endpoint implementation