Fixing authentication stuff.