Authentication fixes