Fixed a login/register crash.