Updating tests.
Updating entities.
Minor - adding comments
Fixing login