Fixed login/register validation in route.