fix #107

Make sure username actually exists before querying db.