complete basic authentication system