Added some checks on user login for deletion