Better code handling on auth
Added missing lib files