bits and pieces of clean up for auth