The distance between the points $A$ and $B$ is $\sqrt{5}.$ If $A = (a,-1)$ and $B = (2,2a-7),$ then find the sum of all possible values of $a.$