Not sure of your location but in the UK if you're within your probation period you have as much right to quit as they do to fire you, no matter what the contract says.
Couple of things, hand the access fob back to the boss and ask for a signature to say you've done as such, do it face to face, take your partner or a friend with you if this guy really is an arse.
Reason to get the fob signed off is, as happened to a friend of mine before, they may claim they never had it back from you and send you a bill for it plus any things that '"went missing" after you left.
Yeah I thought about the fob. I have left a note saying it is with building security. too late to do it face to face. plus he will not be in the office tomorrow which is why i am going to email him tonight with my resignation. he doesnt come to the office in person much. just calls and bullies people over the phone.