generalizing header locations, adding username validation