Changed indentation
Added a unique index on user emails
Added password check and unique email check to register action