Moved authentication to dispatch event and added active class to default list.