This might be related to @neil’s preferences update. It looks like the cog links to /username/preferences and then you are routed to /username/preferences/account, so clicking back goes to /username/preferences causing a loop.