move session function to user controller
move session controller to user controller