login almost done
added proper delegation and login/register