The easiest way to do this is require that the user has the same name as the database, and configure pg_hba.conf so that all users are limited to the sameuser database. For instance, something like:
# TYPE DATABASE USER CIDR-ADDRESS METHOD host sameuser all 0.0.0.0/0 md5
You'll need to add this in addition to listing any administrative accounts that have access to all the databases separately. If you know the IP address users will be connecting from, change 0.0.0.0/0 to match. If users are connecting via the local socket rather than over TCPIP, change TYPE to local and remove the address column. The md5 method means that passwords are required. You'll also need to have a row for the template1 database that gives all users access.
As for not allowing them to see other user's databases at all, I'm not sure what you can do about it since they're listed in the pg_catalog schema, and listed by psql -l