Fixing authorization issues