Started reworking authentication system