Added password confirmation and flash errors