adding error codes to user controller