Get login endpoint implementation closer to spec