Access token database

Used HashSet and refactored the code according to the comments.