code: def login(username):
      
      from uliweb.utils.date import now
      from uliweb import request
  
      User = get_model('user')
  
      if isinstance(username, (str, unicode)):
          user = User.get(User.c.username==username)
      else:
          user = username
      user.last_login = now()
      user.save()
      set_user_session(user)
      return True
docs: return user