Refactored token retrival.
refixed cookie name.
Updated cookies another time.
Merge branch 'test' into dev