The contains here was meant to be analogous to seeing if a user exists in the database before matching the password.  I thought it'd be a bit neater than doing a try-catch on key not found, is there a better way to express this?