Initial code added to user controller