implemented base authentication system