we have to store usernames in their original form and in their lowercase form in these two dynamodb tables because we need case-insensitive uniqueness checks and case-sensitive retrievals. if a user registered with the username "ashoat," we should allow that user to log in with "Ashoat," too. however, we should not allow a different user to register the username "Ashoat."
searched for all places where we use USERS_TABLE_USERNAME_ATTRIBUTE or RESERVED_USERNAMES_TABLE_PARTITION_KEY and checked whether we were doing a retrieval or uniqueness check
if we were doing a uniqueness check, i swapped out the attribute with the lowercase equivalent. i made sure we always write the lowercase username to DDB along with the original username.
would normally add @bartek here but he's on vacation