updated isUser method to return user from database from a given access code