formatting
more error logging, refreshing auth cookie in the event it prematurely expires