registration complete fully working authentication system