Clean up test code
Add functional tests for logging in

Also minor clean up of previous functional tests
Minor update TODO and manage.py