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