Added SQL and basic login/register functions