access code prompt checks database for correct code. small code cleanup