Fixes in authorization