Better implementation of client-side password confirmation