v3.0: Adding authentication. Major bugs as of now.