fixes and updates in login/register and quering goals for logged in user

updates in entities (and database)