Added some security to editing and creating cards