Because you were not on the lease, you do not have an automatic right to stay. The landlord can require you to prove you are financially qualified and sufficiently employed, just as they would require of any prospective tenant. However, because you have established tenancy, even illegally, the landlord must still follow state law in having you lawfully removed aka eviction.
So, speak with the landlord, see if they are willing to have you take over the remaining term of the lease, offer you your own lease (voiding the current one), or voiding the current lease and putting you on a month to month basis. Be prepared to move in the next 30 - 60 days just in case.
One other point. Technically, the security deposit that was paid belongs to the estate of the roommate. The landlord should ask you to pay a security deposit and return the roommate's deposit to their estate. The landlord can say nothing and you can say nothing, but if the executor of the roommate's estate says something, it can become an issue.