If I'm reading this right, you tried to pay your rent with the security deposit instead of the actual rent. If that's the case, then yes, he has that right. You didn't pay your rent. The security deposit is not the rent and is help to insure that you don't trash the place.
Your security deposit is not to be used for rent. The whole point of a security deposit is to cover any damages to the property incurred during your stay. I am sure if you look at your lease you will see a provision for this. Since you didn't pay the rent you have broke the terms of your lease and your landlord is well within his rights to evict you.
Yep .. your security deposit is not considered 'rent'. It is kept for insurance .. however .. eviction is never immediate. If you pay month to month .. and you have skipped a month, or haven't paid your last month .. I believe he must provide you with written notice of at least 30 days to move out.
You failed to pay rent. Yet you question if you have a right to remain? You wish to apply your security deposit as your last month's rent. This may be done if both parties agree to it, but your lease, a contract of both parties obligations, probably states otherwise. Unless you achieve a new agreement, you are in breach, and forfeit your deposit and still owe the last month, if your lease so indicates, and local laws allow. If you are starting out, bad credit and lawyer fees & costs may be further obstacles to overcome. You have the facts, lease, and know the landlord. Get local advice & do what is in your long term interests. I offer this not as legal advice, just personal opinion. Good luck! Things are difficult everywhere.