Error: Can't Login to Admin Site - Sitecore

Error

When you try to log into the Sitecore Admin site, you get an error page stating Object of type 'System.Int32' cannot be converted to type 'System.Web.Security.Cryptography.Purpose'.

Solution

Change the following web.config setting to false.

<setting name=”Login.RememberLastLoggedInUserName” value=”false” />