Added password confirmation and flash error