def login_user(user, remember = false)
      session["app_user"] = Caboose::StdClass.new({      
        :id         => user.id         ,
        :site_id    => user.site_id    ,
        :first_name => user.first_name ,
        :last_name  => user.last_name  ,
        :username   => user.username   ,
        :email      => user.email                             
      })  
      cookies.permanent[:caboose_user_id] = user.id if remember
    end
def login_user(user, remember = false)
      session["app_user"] = Caboose::StdClass.new({      
        :id         => user.id         ,
        :site_id    => user.site_id    ,
        :first_name => user.first_name ,
        :last_name  => user.last_name  ,
        :username   => user.username   ,
        :email      => user.email                             
      })  
      cookies.permanent[:caboose_user_id] = user.id if remember
    end
Logs in a user