improving security to include connection to database for user lookup