Added unique constraints to login controller