Fixes to auth process