Reworked authentication class, renamed from login to authentication. Fixed several bugs.