title: TypeError at /accounts/login/ id must be an instance of (str, unicode, ObjectId), not <type 'int'>
body: <p>This is my first example code for <code>mongodb</code></p>
  <p>I am trying to connect my <code>django</code> with <code>mongodb</code>.
  I did my registration part successfully, But when I am trying to log in its showing an error page.</p>
  <pre><code>TypeError at /accounts/login/
  id must be an instance of (str, unicode, ObjectId), not type 'int'
  </code></pre>
  <p>I am using django user authentication,</p>
  <p>this is my url
  <strong><code>url(r'^accounts/login/', 'django.contrib.auth.views.login'),</code></strong></p>
  <p>below is my full traceback,</p>
  <pre><code>TypeError at /admin/profile/
  id must be an instance of (str, unicode, ObjectId), not &lt;type 'int'&gt;
  Request Method: GET
  Request URL:    http://www.myapp.com/accounts/login/
  Django Version: 1.3
  Exception Type: TypeError
  Exception Value:    
  id must be an instance of (str, unicode, ObjectId), not &lt;type 'int'&gt;
  Exception Location: /home/sakeer/workspace/entevirtual/lib/python2.7/site-
  packages/pymongo-2.4.2-py2.7-linux-x86_64.egg/bson/objectid.py in __validate, line 198
  Python Executable:  /home/sakeer/workspace/entevirtual/bin/python
  Python Version: 2.7.3
  Python Path:    
  ['/home/sakeer/workspace/enteproject',
   '/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
   '/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg',
   '/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/djangotoolbox-0.9.2-py2.7.egg',
   '/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django_mongodb_engine-0.4.0-py2.7.egg',
   '/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/pymongo-2.4.2-py2.7-linux-x86_64.egg',
   '/home/sakeer/workspace/entevirtual/lib/python27.zip',
   '/home/sakeer/workspace/entevirtual/lib64/python2.7',
   '/home/sakeer/workspace/entevirtual/lib64/python2.7/plat-linux2',
   '/home/sakeer/workspace/entevirtual/lib64/python2.7/lib-tk',
   '/home/sakeer/workspace/entevirtual/lib64/python2.7/lib-old',
   '/home/sakeer/workspace/entevirtual/lib64/python2.7/lib-dynload',
   '/usr/lib64/python2.7',
   '/usr/lib/python2.7',
   '/usr/lib64/python2.7/lib-tk',
   '/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages',
   '/home/sakeer/workspace/enteproject/lib',
   '/home/sakeer/workspace/enteproject/lib']
  </code></pre>
  <p>where and what i am missing</p>