lots of changes

1) added ios login/logout
2) added template context processors in settings.py
3) fixed document name getter
4) fixed oneToOneField(User). it actually has to be a foreign key with
the key set to be something other than the primary key. else, django
will not let it act like a manyToOneField.