Added email support, fixed errors in login/register