Remove cursor variable from controllers module
Add user id to session variables; use it