Added unauth exception, changes to auth handling