user controller bug fix for nil user