Delete Cards functionality

Added a php function to delete cards. Fixed a bug that was enabling
logged in users to see the log in page.