removing returns and added 401 error send to user