improved authorization(automatic auth)