Fix rescue in logout method

String#match? isn't a defined method for String, we want #match