Fix auth config and username validation