Parse cookies before authentication