Completed base authentication logic